Package com.esri.core.geometry.ogc
Class OGCGeometry
java.lang.Object
com.esri.core.geometry.ogc.OGCGeometry
- Direct Known Subclasses:
OGCCurve
,OGCGeometryCollection
,OGCPoint
,OGCSurface
OGC Simple Feature Access specification v.1.2.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasBinary()
(package private) String
asGeoJsonImpl
(int export_flags) asJson()
asText()
abstract OGCGeometry
boundary()
buffer
(double distance) centroid()
boolean
contains
(OGCGeometry another) abstract OGCGeometry
Converts this Geometry to the OGCMulti* if it is not OGCMulti* or OGCGeometryCollection already.int
static OGCGeometry
Create an OGCGeometry instance from the GeometryCursor.static OGCGeometry
createFromEsriCursor
(GeometryCursor gc, SpatialReference sr, boolean skipEmpty) static OGCGeometry
createFromEsriGeometry
(Geometry geom, SpatialReference sr) static OGCGeometry
createFromEsriGeometry
(Geometry geom, SpatialReference sr, boolean multiType) static OGCGeometry
createFromOGCStructure
(OGCStructure ogcStructure, SpatialReference sr) boolean
crosses
(OGCGeometry another) difference
(OGCGeometry another) int
boolean
disjoint
(OGCGeometry another) double
distance
(OGCGeometry another) envelope()
boolean
equals
(OGCGeometry another) Deprecated.boolean
boolean
Equals
(OGCGeometry another) OGC equals.abstract long
Returns an estimate of this object size in bytes.static OGCGeometry
fromBinary
(ByteBuffer binary) static OGCGeometry
fromEsriShape
(ByteBuffer buffer) static OGCGeometry
fromGeoJson
(String string) static OGCGeometry
static OGCGeometry
abstract String
abstract Geometry
int
hashCode()
intersection
(OGCGeometry another) boolean
intersects
(OGCGeometry another) boolean
is3D()
protected boolean
boolean
isEmpty()
boolean
boolean
isSimple()
Returns true if this geometric object has no anomalous geometric points, such as self intersection or self tangency.boolean
Extension method - checks if geometry is simple for Geodatabase.abstract OGCGeometry
locateAlong
(double mValue) abstract OGCGeometry
locateBetween
(double mStart, double mEnd) Resolves topological issues in this geometry and makes it Simple according to OGC specification.makeSimpleRelaxed
(boolean forceProcessing) Makes a simple geometry for Geodatabase.MakeSimpleRelaxed
(boolean forceProcessing) Deprecated.double
double
MaxZ()
double
double
MinZ()
boolean
overlaps
(OGCGeometry another) abstract OGCGeometry
For the geometry collection types, when it has 1 or 0 elements, converts a MultiPolygon to Polygon, MultiPoint to Point, MultiLineString to a LineString, and OGCConcretGeometryCollection to the reduced element it contains.boolean
relate
(OGCGeometry another, String matrix) void
setSpatialReference
(SpatialReference esriSR_) private OGCGeometry
int
SRID()
symDifference
(OGCGeometry another) toString()
boolean
touches
(OGCGeometry another) union
(OGCGeometry another) boolean
within
(OGCGeometry another)
-
Field Details
-
esriSR
SpatialReference of the Geometry.
-
-
Constructor Details
-
OGCGeometry
public OGCGeometry()
-
-
Method Details
-
dimension
public int dimension() -
coordinateDimension
public int coordinateDimension() -
geometryType
-
estimateMemorySize
public abstract long estimateMemorySize()Returns an estimate of this object size in bytes.This estimate doesn't include the size of the
SpatialReference
object because instances ofSpatialReference
are expected to be shared among geometry objects.- Returns:
- Returns an estimate of this object size in bytes.
-
SRID
public int SRID() -
envelope
-
asText
-
asBinary
-
asGeoJson
-
asGeoJsonImpl
-
asJson
- Returns:
- Convert to REST JSON.
-
isEmpty
public boolean isEmpty() -
MinZ
public double MinZ() -
MaxZ
public double MaxZ() -
MinMeasure
public double MinMeasure() -
MaxMeasure
public double MaxMeasure() -
isSimple
public boolean isSimple()Returns true if this geometric object has no anomalous geometric points, such as self intersection or self tangency. See the "Simple feature access - Part 1" document (OGC 06-103r4) for meaning of "simple" for each geometry type. The method has O(n log n) complexity when the input geometry is simple. For non-simple geometries, it terminates immediately when the first issue is encountered.- Returns:
- True if geometry is simple and false otherwise. Note: If isSimple is true, then isSimpleRelaxed is true too.
-
isSimpleRelaxed
public boolean isSimpleRelaxed()Extension method - checks if geometry is simple for Geodatabase.- Returns:
- Returns true if geometry is simple, false otherwise. Note: If isSimpleRelaxed is true, then isSimple is either true or false. Geodatabase has more relaxed requirements for simple geometries than OGC.
-
MakeSimpleRelaxed
Deprecated. -
makeSimpleRelaxed
Makes a simple geometry for Geodatabase.- Returns:
- Returns simplified geometry. Note: isSimpleRelaxed should return true after this operation.
-
makeSimple
Resolves topological issues in this geometry and makes it Simple according to OGC specification.- Returns:
- Returns simplified geometry. Note: isSimple and isSimpleRelaxed should return true after this operation.
-
is3D
public boolean is3D() -
isMeasured
public boolean isMeasured() -
boundary
-
Equals
OGC equals. Performs topological comparison with tolerance. This is different from equals(Object), that uses exact comparison. -
equals
Deprecated. -
disjoint
-
intersects
-
touches
-
crosses
-
within
-
contains
-
overlaps
-
relate
-
locateAlong
-
locateBetween
-
distance
-
simplifyBunch_
-
buffer
-
centroid
-
convexHull
-
intersection
-
union
-
difference
-
symDifference
-
getEsriGeometry
-
getEsriGeometryCursor
-
getEsriSpatialReference
-
createFromEsriCursor
Create an OGCGeometry instance from the GeometryCursor.- Parameters:
gc
-sr
-- Returns:
- Geometry instance created from the geometry cursor.
-
createFromEsriCursor
public static OGCGeometry createFromEsriCursor(GeometryCursor gc, SpatialReference sr, boolean skipEmpty) -
fromText
-
fromBinary
-
fromEsriShape
-
fromJson
-
fromGeoJson
-
createFromEsriGeometry
-
createFromEsriGeometry
public static OGCGeometry createFromEsriGeometry(Geometry geom, SpatialReference sr, boolean multiType) -
createFromOGCStructure
-
isConcreteGeometryCollection
protected boolean isConcreteGeometryCollection() -
setSpatialReference
-
convertToMulti
Converts this Geometry to the OGCMulti* if it is not OGCMulti* or OGCGeometryCollection already.- Returns:
- OGCMulti* or OGCGeometryCollection instance.
-
reduceFromMulti
For the geometry collection types, when it has 1 or 0 elements, converts a MultiPolygon to Polygon, MultiPoint to Point, MultiLineString to a LineString, and OGCConcretGeometryCollection to the reduced element it contains. If OGCConcretGeometryCollection is empty, returns self.- Returns:
- A reduced geometry or this.
-
toString
-
equals
-
hashCode
public int hashCode()
-