Examples of OGCGeometry


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

  // WKT constructor - can use SetSRID on constructed multi-point
  public BytesWritable evaluate(Text wkwrap) throws UDFArgumentException {
    String wkt = wkwrap.toString();
    try {
      OGCGeometry ogcObj = OGCGeometry.fromText(wkt);
      ogcObj.setSpatialReference(null);
      if (ogcObj.geometryType().equals("MultiPoint")) {
        return GeometryUtils.geometryToEsriShapeBytesWritable(ogcObj);
      } else {
        LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_MULTIPOINT, GeometryUtils.OGCType.UNKNOWN);
        return null;
      }
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;
    }
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;
    }
   
    int wktExportFlag = getWktExportFlag(GeometryUtils.getType(geomref));
   
    try {
      // mind: GeometryType with ST_AsText(ST_GeomFromText('MultiLineString((0 80, 0.03 80.04))'))
      // return new Text(ogcGeometry.asText());
      return new Text(GeometryEngine.geometryToWkt(ogcGeometry.getEsriGeometry(), wktExportFlag));
    } catch (Exception e){
      LOG.error(e.getMessage());
      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;
    }

    resultInt.set(ogcGeometry.coordinateDimension());
    return resultInt;
  }
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 {

      switch(GeometryUtils.getType(geomref)) {
      case ST_LINESTRING:
      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);
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;
    }

    resultInt.set(ogcGeometry.dimension());
    return resultInt;
  }
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;
    }
    if (!ogcGeometry.isMeasured()) {
      LogUtils.Log_NotMeasured(LOG);
      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.MaxZ());
    return resultDouble;
  }
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;
    }
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;
    }
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.