

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object com.esri.core.geometry.GeometryEngine
public class GeometryEngine
Provides services that operate on geometry instances.
Constructor Summary  

GeometryEngine()

Method Summary  

static Polygon[] 
buffer(Geometry[] geometries,
SpatialReference spatialReference,
double[] distances,
Unit unit,
boolean toUnionResults)
Calculates a buffer polygon for each geometry at each of the corresponding specified distances. 
static Polygon 
buffer(Geometry geometry,
SpatialReference spatialReference,
double distance,
Unit unit)
Calculates buffer polygon of the geometry as specified by the distance input. 
static Geometry 
clip(Geometry geometry,
Envelope envelope,
SpatialReference spatialReference)
Calculates the clipped geometry from an target geometry by an envelope. 
static boolean 
contains(Geometry geometry1,
Geometry geometry2,
SpatialReference spatialReference)
Indicates if one geometry contains another geometry. 
static boolean 
crosses(Geometry geometry1,
Geometry geometry2,
SpatialReference spatialReference)
Indicates if one geometry crosses another geometry. 
static Geometry 
difference(Geometry inputGeometry,
Geometry substractor,
SpatialReference spatialReference)
Creates the difference of two geometries. 
static double 
distance(Geometry geometry1,
Geometry geometry2,
SpatialReference spatialReference)
Calculates the 2D planar distance between two geometries. 
static boolean 
equals(Geometry geometry1,
Geometry geometry2,
SpatialReference spatialReference)
Indicates if two geometries are equal. 
static double 
geodesicLength(Geometry geometry,
SpatialReference spatialReference,
LinearUnit lengthUnit)
A geodesic length is the shortest distance between any two points on the earth's surface when the earth's surface is approximated by a spheroid. 
static Geometry 
geometryFromEsriShape(byte[] esriShapeBuffer,
Geometry.Type geometryType)
Imports geometry from the ESRI shape file format. 
static byte[] 
geometryToEsriShape(Geometry geometry)
Exports geometry to the ESRI shape file format. 
static String 
geometryToJson(int wkid,
Geometry geometry)
Deprecated. 
static String 
geometryToJson(SpatialReference spatialReference,
Geometry geometry)
Exports the specified geometry instance to its JSON representation. 
static Proximity2DResult 
getNearestCoordinate(Geometry geometry,
Point inputPoint,
boolean bTestPolygonInterior)
Finds the coordinate of the geometry which is closest to the specified point. 
static Proximity2DResult 
getNearestVertex(Geometry geometry,
Point inputPoint)
Finds nearest vertex on the geometry which is closed to the specified point. 
static Proximity2DResult[] 
getNearestVertices(Geometry geometry,
Point inputPoint,
double searchRadius,
int maxVertexCountToReturn)
Finds all vertices in the given distance from the specified point, sorted from the closest to the furthest. 
static Geometry 
intersect(Geometry inputGeometry,
Geometry intersector,
SpatialReference spatialReference)
Creates a geometry through intersection between two geometries. 
static MapGeometry 
jsonToGeometry(org.codehaus.jackson.JsonParser json)
Imports the MapGeometry from it's JSON representation. 
static Point 
project(double x,
double y,
SpatialReference sr)
Projects the given point from EPSG:4326 to the output Spatial Reference. 
static Geometry 
project(Geometry geometry,
SpatialReference inputSR,
SpatialReference outputSR)
Projects the given geometry instance from the input spatial reference to the output Spatial Reference. 
static Geometry 
simplify(Geometry geometry,
SpatialReference spatialReference)
Performs the simplify operation on the geometry. 
static boolean 
touches(Geometry geometry1,
Geometry geometry2,
SpatialReference spatialReference)
Indicates if one geometry touches another geometry. 
static Geometry 
union(Geometry[] geometries,
SpatialReference spatialReference)
Constructs a new geometry by union an array of geometries. 
static boolean 
within(Geometry geometry1,
Geometry geometry2,
SpatialReference spatialReference)
Indicates if one geometry is within another geometry. 
Methods inherited from class java.lang.Object 

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public GeometryEngine()
Method Detail 

public static Geometry project(Geometry geometry, SpatialReference inputSR, SpatialReference outputSR)
geometry
 The input geometry to be projected.inputSR
 The spatial reference of the input geometry.outputSR
 The spatial reference to project the geometry to.
public static Point project(double x, double y, SpatialReference sr)
sr
 The spatial reference to project the geometry to.
public static MapGeometry jsonToGeometry(org.codehaus.jackson.JsonParser json)
json
 The JSON representation of the geometry (with spatial reference).
@Deprecated public static String geometryToJson(int wkid, Geometry geometry)
wkid
 The spatial reference Well Known ID to be used for the Json representation.geometry
 The geometry to be exported to JSON.
geometryToJson(SpatialReference spatialiReference, Geometry geometry)
public static String geometryToJson(SpatialReference spatialReference, Geometry geometry)
spatialReference
 The spatial reference of associated object.geometry
 The geometry.
public static Geometry geometryFromEsriShape(byte[] esriShapeBuffer, Geometry.Type geometryType)
esriShapeBuffer
 The buffer containing geometry in the ESRI shape file format.geometryType
 The required type of the Geometry to be imported. Use Geometry.Type.Unknown if the geometry
type needs to be determined from the buffer content.
GeometryException
 when the geometryType is not Geometry.Type.Unknown and the buffer contains geometry that
cannot be converted to the given geometryType. or the buffer is corrupt. Another exception possible is
IllegalArgumentsException.public static byte[] geometryToEsriShape(Geometry geometry)
geometry
 The geometry to export. (null value is not allowed)
public static Geometry union(Geometry[] geometries, SpatialReference spatialReference)
geometries
 The geometries to union.spatialReference
 The spatial reference of the geometries.
public static Geometry difference(Geometry inputGeometry, Geometry substractor, SpatialReference spatialReference)
inputGeometry
 The geometry being subtracted.substractor
 The geometry object to subtract from.spatialReference
 The spatial reference of the geometries.
public static boolean equals(Geometry geometry1, Geometry geometry2, SpatialReference spatialReference)
geometry1
 Geometry.geometry2
 Geometry.spatialReference
 The spatial reference of the geometries.
public static Geometry intersect(Geometry inputGeometry, Geometry intersector, SpatialReference spatialReference)
inputGeometry
 Geometry.intersector
 GeometryspatialReference
 The spatial reference of the geometries.
public static boolean within(Geometry geometry1, Geometry geometry2, SpatialReference spatialReference)
geometry1
 The base geometry that is tested for within relationship to the other geometry.geometry2
 The comparison geometry that is tested for the contains relationship to the other geometry.spatialReference
 The spatial reference of the geometries.
public static boolean contains(Geometry geometry1, Geometry geometry2, SpatialReference spatialReference)
geometry1
 The geometry that is tested for the contains relationship to the other geometry..geometry2
 The geometry that is tested for within relationship to the other geometry.spatialReference
 The spatial reference of the geometries.
public static boolean crosses(Geometry geometry1, Geometry geometry2, SpatialReference spatialReference)
geometry1
 The geometry to cross.geometry2
 The geometry being crossed.spatialReference
 The spatial reference of the geometries.
public static boolean touches(Geometry geometry1, Geometry geometry2, SpatialReference spatialReference)
geometry1
 The geometry to touch.geometry2
 The geometry to be touched.spatialReference
 The spatial reference of the geometries.
public static double distance(Geometry geometry1, Geometry geometry2, SpatialReference spatialReference)
geometry1
 Geometry.geometry2
 Geometry.spatialReference
 The spatial reference of the geometries.
public static Geometry clip(Geometry geometry, Envelope envelope, SpatialReference spatialReference)
geometry
 The geometry to be clipped.envelope
 The envelope used to clip.spatialReference
 The spatial reference of the geometries.
public static Polygon[] buffer(Geometry[] geometries, SpatialReference spatialReference, double[] distances, Unit unit, boolean toUnionResults)
geometries
 An array of geometries to be buffered.spatialReference
 The spatial reference of the geometries.distances
 The corresponding distances for the input geometries to be buffered.unit
 The unit of the values in the distances array. Must be of the same unit type as spatial reference.toUnionResults
 True if all geometries buffered at a given distance are to be unioned into a single polygon.
public static Polygon buffer(Geometry geometry, SpatialReference spatialReference, double distance, Unit unit)
geometry
 Geometry to be buffered.spatialReference
 The spatial reference of the geometry.distance
 The specified distance for buffer.unit
 The unit of the values in the distances array. Must be of the same unit type as spatial reference.
public static Proximity2DResult getNearestCoordinate(Geometry geometry, Point inputPoint, boolean bTestPolygonInterior)
inputPoint
 The point to find the nearest coordinate in the geometry for.geometry
 The geometry to consider.
public static Proximity2DResult getNearestVertex(Geometry geometry, Point inputPoint)
inputPoint
 The point to find the nearest vertex of the geometry for.geometry
 The geometry to consider.
public static Proximity2DResult[] getNearestVertices(Geometry geometry, Point inputPoint, double searchRadius, int maxVertexCountToReturn)
inputPoint
 The point to start from.geometry
 The geometry to consider.searchRadius
 The search radius.maxVertexCountToReturn
 The maximum number number of vertices to return.
public static Geometry simplify(Geometry geometry, SpatialReference spatialReference)
geometry
 The geometry to be simplified.spatialReference
 The spatial reference of the geometry to be simplified.
public static double geodesicLength(Geometry geometry, SpatialReference spatialReference, LinearUnit lengthUnit)
geometry
 The input geometry.spatialReference
 The spatial reference in which the coordinates of the geometry are defined. This spatial
reference can be a Geographic Coordinate System or a Projected Coordinate System, but it cannot be local.lengthUnit
 The units to return the length in. If null is specified, the length is returned in meters.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 