本文整理汇总了Java中com.esri.core.geometry.ogc.OGCGeometry.createFromEsriGeometry方法的典型用法代码示例。如果您正苦于以下问题:Java OGCGeometry.createFromEsriGeometry方法的具体用法?Java OGCGeometry.createFromEsriGeometry怎么用?Java OGCGeometry.createFromEsriGeometry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.esri.core.geometry.ogc.OGCGeometry
的用法示例。
在下文中一共展示了OGCGeometry.createFromEsriGeometry方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: evaluate
import com.esri.core.geometry.ogc.OGCGeometry; //导入方法依赖的package包/类
public BytesWritable evaluate(Text wkwrap, int wkid) throws UDFArgumentException {
String wkt = wkwrap.toString();
try {
Geometry geomObj = GeometryEngine.geometryFromWkt(wkt,
0,
Geometry.Type.Unknown);
SpatialReference spatialReference = null; // Idea: OGCGeometry.setSpatialReference after .fromText
if (wkid != GeometryUtils.WKID_UNKNOWN) {
spatialReference = SpatialReference.create(wkid);
}
OGCGeometry ogcObj = OGCGeometry.createFromEsriGeometry(geomObj, spatialReference);
return GeometryUtils.geometryToEsriShapeBytesWritable(ogcObj);
} catch (Exception e) { // IllegalArgumentException, GeometryException
LogUtils.Log_InvalidText(LOG, wkt);
return null;
}
}
示例2: terminatePartial
import com.esri.core.geometry.ogc.OGCGeometry; //导入方法依赖的package包/类
public BytesWritable terminatePartial() throws HiveException {
maybeAggregateBuffer(true);
if (geometries.size() == 1) {
OGCGeometry rslt = OGCGeometry.createFromEsriGeometry(geometries.get(0), spatialRef);
return GeometryUtils.geometryToEsriShapeBytesWritable(rslt);
} else {
return null;
}
}
示例3: terminatePartial
import com.esri.core.geometry.ogc.OGCGeometry; //导入方法依赖的package包/类
public BytesWritable terminatePartial() throws HiveException {
try {
Geometry rslt = xgc.next();
lgc = null; // not reusable
xgc = null; // not reusable
OGCGeometry ogeom = OGCGeometry.createFromEsriGeometry(rslt, spatialRef);
return GeometryUtils.geometryToEsriShapeBytesWritable(ogeom);
} catch (Exception e) {
LogUtils.Log_InternalError(LOG, "ST_Aggr_Union: " + e);
}
return null;
}
示例4: parseGeom
import com.esri.core.geometry.ogc.OGCGeometry; //导入方法依赖的package包/类
@Override
protected OGCGeometry parseGeom(JsonParser parser) {
MapGeometry mapGeom = GeometryEngine.jsonToGeometry(parser);
return OGCGeometry.createFromEsriGeometry(mapGeom.getGeometry(), mapGeom.getSpatialReference());
}