Package com.esri.core.geometry

Examples of com.esri.core.geometry.Point


      int nPath = lines.getPathCount();
      double length = 0.;
      for (int ix = 0; ix < nPath; ix++) {
        int curPt = lines.getPathStart(ix);
        int pastPt = lines.getPathEnd(ix);
        Point fromPt = lines.getPoint(curPt);
        Point toPt = null;
        for (int vx = curPt+1; vx < pastPt; vx++) {
          toPt = lines.getPoint(vx);
          length += GeometryEngine.geodesicDistanceOnWGS84(fromPt, toPt);
          fromPt = toPt;
        }
View Full Code Here


      if (wkid != GeometryUtils.WKID_UNKNOWN) {
        spatialReference = SpatialReference.create(wkid);
      }
      Envelope envBound = new Envelope();
      ogcGeometry.getEsriGeometry().queryEnvelope(envBound);
      Point centroid = new Point((envBound.getXMin() + envBound.getXMax()) / 2.,
                     (envBound.getYMin() + envBound.getYMax()) / 2.);
      return GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(centroid,
                                  spatialReference));
    default:
      LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_POLYGON, ogcType);
View Full Code Here

      case ST_MULTILINESTRING:
        MultiPath lines = (MultiPath)(ogcGeometry.getEsriGeometry());
        int nPaths = lines.getPathCount();
        boolean rslt = true;
        for (int ix = 0; rslt && ix < nPaths; ix++) {
          Point p0 = lines.getPoint(lines.getPathStart(ix));
          Point pf = lines.getPoint(lines.getPathEnd(ix)-1);
          rslt = rslt && pf.equals(p0)// no tolerance - OGC
        }
        resultBoolean.set(rslt);
        return resultBoolean;
      default// ST_IsClosed gives ERROR on Point or Polygon, on Postgres/Oracle
        LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_LINESTRING, GeometryUtils.getType(geomref));
View Full Code Here

  // ZM
  public BytesWritable evaluate(DoubleWritable x, DoubleWritable y, DoubleWritable z, DoubleWritable m) {
    if (x == null || y == null || z == null) {
      return null;
    }
    Point stPt = new Point(x.get(), y.get(), z.get());
    if (m != null)
      stPt.setM(m.get());
    return GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(stPt, null));
  }
View Full Code Here

    if (x == null || y == null) {
      //LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }
    try {
      Point stPt = new Point(x.get(), y.get());
      if (z != null)
        stPt.setZ(z.get());
      if (m != null)
        stPt.setM(m.get());
      BytesWritable ret = GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(stPt, null));
      return ret;
    } catch (Exception e) {
        //LogUtils.Log_InternalError(LOG, "ST_Point: " + e);
        return null;
View Full Code Here

      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    Geometry esriGeom = ogcGeometry.getEsriGeometry();
    Point pn = null;
    int idx = index.get();
    idx = (idx == 0) ? 0 : idx-1// consistency with SDE ST_Geometry
    switch(esriGeom.getType()) {
    case Line:
    case Polyline:
View Full Code Here

TOP

Related Classes of com.esri.core.geometry.Point

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.