Examples of OGCGeometry


Examples of com.esri.core.geometry.ogc.OGCGeometry

    if (!GeometryUtils.compareSpatialReferences(geometryref1, geometryref2)) {
      LogUtils.Log_SRIDMismatch(LOG, geometryref1, geometryref2);
      return null;
    }

    OGCGeometry ogcGeom1 = GeometryUtils.geometryFromEsriShape(geometryref1);
    OGCGeometry ogcGeom2 = GeometryUtils.geometryFromEsriShape(geometryref2);
    if (ogcGeom1 == null || ogcGeom2 == null){
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    OGCGeometry commonGeom;
    try {   
      commonGeom = ogcGeom1.intersection(ogcGeom2);
      return GeometryUtils.geometryToEsriShapeBytesWritable(commonGeom);
    } catch (Exception e) {
        LogUtils.Log_InternalError(LOG, "ST_Intersection: " + e);
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

    if (geomref == null || geomref.getLength() == 0) {
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(geomref);

    if (ogcGeometry == null){
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    try {
      resultBoolean.set(ogcGeometry.isSimple());
    } catch (Exception e) {
        LogUtils.Log_InternalError(LOG, "ST_IsSimple" + e);
      return null;
    }
    return resultBoolean;
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

  // WKT constructor - can use SetSRID on constructed multi-polygon
  public BytesWritable evaluate(Text wkwrap) throws UDFArgumentException {
    String wkt = wkwrap.toString();
    try {
      OGCGeometry ogcObj = OGCGeometry.fromText(wkt);
      ogcObj.setSpatialReference(null);
      if (ogcObj.geometryType().equals("MultiPolygon")) {
        return GeometryUtils.geometryToEsriShapeBytesWritable(ogcObj);
      } else {
        LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_MULTIPOLYGON, GeometryUtils.OGCType.UNKNOWN);
        return null;
      }
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

    // now build geometry array to pass to GeometryEngine.union
    Geometry [] geomsToProcess = new Geometry[geomrefs.length];
   
    for (int i=0;i<geomrefs.length;i++){
      //HiveGeometry hiveGeometry = GeometryUtils.geometryFromEsriShape(geomrefs[i]);
      OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(geomrefs[i]);
     
      if (ogcGeometry == null){
        LogUtils.Log_ArgumentsNull(LOG);
        return null;
      }
     
      geomsToProcess[i] = ogcGeometry.getEsriGeometry();
    }
   
    try {

          Geometry [] geomResult = GeometryEngine.convexHull(geomsToProcess, true);
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

    if (geomref == null || geomref.getLength() == 0) {
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(geomref);
    if (ogcGeometry == null){
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

        spatialReference = SpatialReference.create(wkid);
      }
      byte [] byteArr = wkb.getBytes();
            ByteBuffer byteBuf = ByteBuffer.allocate(byteArr.length);
      byteBuf.put(byteArr);
      OGCGeometry ogcObj = OGCGeometry.fromBinary(byteBuf);
      ogcObj.setSpatialReference(spatialReference);
      String gType = ogcObj.geometryType();
      if (gType.equals("MultiLineString") || gType.equals("LineString")) {
        return GeometryUtils.geometryToEsriShapeBytesWritable(ogcObj);
      } else {
        LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_MULTILINESTRING, GeometryUtils.OGCType.UNKNOWN);
        return null;
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

    if (geomref == null || geomref.getLength() == 0) {
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(geomref);
    if (ogcGeometry == null){
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    resultDouble.set(ogcGeometry.getEsriGeometry().calculateArea2D());
    return resultDouble;
  }
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

        spatialReference = SpatialReference.create(wkid);
      }
      byte [] byteArr = wkb.getBytes();
            ByteBuffer byteBuf = ByteBuffer.allocate(byteArr.length);
      byteBuf.put(byteArr);
      OGCGeometry ogcObj = OGCGeometry.fromBinary(byteBuf);
      ogcObj.setSpatialReference(spatialReference);
      if (ogcObj.geometryType().equals("LineString")) {
        return GeometryUtils.geometryToEsriShapeBytesWritable(ogcObj);
      } else {
        LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_LINESTRING, GeometryUtils.OGCType.UNKNOWN);
        return null;
      }
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

    if (geomref == null || geomref.getLength() == 0) {
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(geomref);
    if (ogcGeometry == null){
      return null;
    }

    switch(GeometryUtils.getType(geomref)) {
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry

    if (geomref == null || geomref.getLength() == 0) {
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(geomref);
    if (ogcGeometry == null) {
      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }
    if (!ogcGeometry.is3D()) {
      LogUtils.Log_Not3D(LOG);
      return null;
    }

    resultDouble.set(ogcGeometry.MinZ());
    return resultDouble;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.