Examples of OGCGeometry


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.isEmpty());
    } catch (Exception e) {
        LogUtils.Log_InternalError(LOG, "ST_IsEmpty" + e);
      return null;
    }
    return resultBoolean;
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 (!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 diffGeometry = ogcGeom1.difference(ogcGeom2);
   
    // we have to infer the type of the differenced geometry because we don't know
    // if it's going to end up as a single or multi-part geometry
    // OGCType inferredType = GeometryUtils.getInferredOGCType(diffGeometry.getEsriGeometry());
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;
    }

    Envelope envBound = new Envelope();
    ogcGeometry.getEsriGeometry().queryEnvelope(envBound);
    resultDouble.set(envBound.getXMax());
    return resultDouble;
  }
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 {
      OGCGeometry boundGeom = ogcGeometry.boundary();
      if (boundGeom.geometryType().equals("MultiLineString") && ((OGCMultiLineString)boundGeom).numGeometries() == 1)
        boundGeom = ((OGCMultiLineString)boundGeom).geometryN(0)// match ST_Boundary/SQL-RDBMS
      return GeometryUtils.geometryToEsriShapeBytesWritable(boundGeom);
    } catch (Exception e) {
      LogUtils.Log_InternalError(LOG, "ST_Boundary: " + e);
      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().calculateLength2D());
    return resultDouble;
  }
View Full Code Here

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

      // if geometry column exists, write it
      if (geometryColumn > -1) {
        BytesWritable bytesWritable = (BytesWritable)fieldWritables.get(geometryColumn);
       
        OGCGeometry ogcGeometry = GeometryUtils.geometryFromEsriShape(bytesWritable);
       
        jsonGen.writeRaw(",\"geometry\":" + GeometryEngine.geometryToJson(null, ogcGeometry.getEsriGeometry()));
       
      }

      jsonGen.writeEndObject();
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 (GeometryUtils.getType(geomref) == GeometryUtils.OGCType.ST_POLYGON) {
View Full Code Here

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

    try {
      SpatialReference spatialReference = null;
      if (wkid != GeometryUtils.WKID_UNKNOWN) {
        spatialReference = SpatialReference.create(wkid);
      }
      OGCGeometry ogcObj = OGCGeometry.fromText(wkt);
      ogcObj.setSpatialReference(spatialReference);
      return GeometryUtils.geometryToEsriShapeBytesWritable(ogcObj);
    } catch (Exception e) {  // IllegalArgumentException, GeometryException
      LogUtils.Log_InvalidText(LOG, wkt);
      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);
      if (ogcObj.geometryType().equals("Point")) {
        return GeometryUtils.geometryToEsriShapeBytesWritable(ogcObj);
      } else {
        LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_POINT, GeometryUtils.OGCType.UNKNOWN);
        return null;
      }
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.