Package com.esri.core.geometry.ogc
Class OGCConcreteGeometryCollection
java.lang.Object
com.esri.core.geometry.ogc.OGCGeometry
com.esri.core.geometry.ogc.OGCGeometryCollection
com.esri.core.geometry.ogc.OGCConcreteGeometryCollection
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
-
Field Summary
FieldsFields inherited from class com.esri.core.geometry.ogc.OGCGeometry
esriSR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasBinary()
(package private) String
asGeoJsonImpl
(int export_flags) asJson()
asText()
boundary()
boolean
contains
(OGCGeometry another) Converts this Geometry to the OGCMulti* if it is not OGCMulti* or OGCGeometryCollection already.int
boolean
crosses
(OGCGeometry another) difference
(OGCGeometry another) int
boolean
disjoint
(OGCGeometry another) double
distance
(OGCGeometry another) envelope()
boolean
boolean
Equals
(OGCGeometry another) OGC equals.long
Returns an estimate of this object size in bytes.flatten()
Flattens Geometry Collection.Fixes topological overlaps in the GeometryCollecion.geometryN
(int n) Returns the Nth geometry in this GeometryCollection.int
hashCode()
intersection
(OGCGeometry another) boolean
is3D()
protected boolean
boolean
isEmpty()
boolean
Checks if collection is flattened.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.locateAlong
(double mValue) locateBetween
(double mStart, double mEnd) makeSimpleRelaxed is not supported for the GeometryCollection instance.makeSimpleRelaxed
(boolean forceProcessing) makeSimpleRelaxed is not supported for the GeometryCollection instance.double
double
MaxZ()
double
double
MinZ()
int
Returns the number of geometries in this GeometryCollection.boolean
overlaps
(OGCGeometry another) private GeometryCursor
prepare_for_ops_
(OGCConcreteGeometryCollection collection) 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) private GeometryCursor
removeOverlapsHelper_
(List<Geometry> geoms) void
setSpatialReference
(SpatialReference esriSR_) symDifference
(OGCGeometry another) private static OGCConcreteGeometryCollection
toGeometryCollection
(OGCGeometry geometry) toList
(GeometryCursor cursor) boolean
touches
(OGCGeometry another) Methods inherited from class com.esri.core.geometry.ogc.OGCGeometry
buffer, centroid, createFromEsriCursor, createFromEsriCursor, createFromEsriGeometry, createFromEsriGeometry, createFromOGCStructure, equals, fromBinary, fromEsriShape, fromGeoJson, fromJson, fromText, getEsriSpatialReference, intersects, MakeSimpleRelaxed, SRID, toString, union, within
-
Field Details
-
TYPE
-
geometries
List<OGCGeometry> geometries
-
-
Constructor Details
-
OGCConcreteGeometryCollection
-
OGCConcreteGeometryCollection
-
OGCConcreteGeometryCollection
-
OGCConcreteGeometryCollection
-
-
Method Details
-
dimension
public int dimension()- Overrides:
dimension
in classOGCGeometry
-
coordinateDimension
public int coordinateDimension()- Overrides:
coordinateDimension
in classOGCGeometry
-
is3D
public boolean is3D()- Overrides:
is3D
in classOGCGeometry
-
isMeasured
public boolean isMeasured()- Overrides:
isMeasured
in classOGCGeometry
-
envelope
- Overrides:
envelope
in classOGCGeometry
-
numGeometries
public int numGeometries()Description copied from class:OGCGeometryCollection
Returns the number of geometries in this GeometryCollection.- Specified by:
numGeometries
in classOGCGeometryCollection
-
geometryN
Description copied from class:OGCGeometryCollection
Returns the Nth geometry in this GeometryCollection.- Specified by:
geometryN
in classOGCGeometryCollection
- Parameters:
n
- The 0 based index of the geometry.
-
geometryType
- Specified by:
geometryType
in classOGCGeometry
-
estimateMemorySize
public long estimateMemorySize()Description copied from class:OGCGeometry
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.- Specified by:
estimateMemorySize
in classOGCGeometry
- Returns:
- Returns an estimate of this object size in bytes.
-
asText
- Overrides:
asText
in classOGCGeometry
-
asBinary
- Overrides:
asBinary
in classOGCGeometry
-
asGeoJson
- Overrides:
asGeoJson
in classOGCGeometry
-
asGeoJsonImpl
- Overrides:
asGeoJsonImpl
in classOGCGeometry
-
isEmpty
public boolean isEmpty()- Overrides:
isEmpty
in classOGCGeometry
-
MinZ
public double MinZ()- Overrides:
MinZ
in classOGCGeometry
-
MaxZ
public double MaxZ()- Overrides:
MaxZ
in classOGCGeometry
-
MinMeasure
public double MinMeasure()- Overrides:
MinMeasure
in classOGCGeometry
-
MaxMeasure
public double MaxMeasure()- Overrides:
MaxMeasure
in classOGCGeometry
-
isSimple
public boolean isSimple()Description copied from class:OGCGeometry
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.- Overrides:
isSimple
in classOGCGeometry
- Returns:
- True if geometry is simple and false otherwise. Note: If isSimple is true, then isSimpleRelaxed is true too.
-
makeSimple
makeSimpleRelaxed is not supported for the GeometryCollection instance.- Overrides:
makeSimple
in classOGCGeometry
- Returns:
- Returns simplified geometry. Note: isSimple and isSimpleRelaxed should return true after this operation.
-
isSimpleRelaxed
public boolean isSimpleRelaxed()Description copied from class:OGCGeometry
Extension method - checks if geometry is simple for Geodatabase.- Overrides:
isSimpleRelaxed
in classOGCGeometry
- 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
makeSimpleRelaxed is not supported for the GeometryCollection instance.- Overrides:
makeSimpleRelaxed
in classOGCGeometry
- Returns:
- Returns simplified geometry. Note: isSimpleRelaxed should return true after this operation.
-
boundary
- Specified by:
boundary
in classOGCGeometry
-
locateAlong
- Specified by:
locateAlong
in classOGCGeometry
-
locateBetween
- Specified by:
locateBetween
in classOGCGeometry
-
getEsriGeometry
- Specified by:
getEsriGeometry
in classOGCGeometry
-
getEsriGeometryCursor
- Overrides:
getEsriGeometryCursor
in classOGCGeometry
-
isConcreteGeometryCollection
protected boolean isConcreteGeometryCollection()- Overrides:
isConcreteGeometryCollection
in classOGCGeometry
-
convexHull
- Overrides:
convexHull
in classOGCGeometry
-
setSpatialReference
- Overrides:
setSpatialReference
in classOGCGeometry
-
convertToMulti
Description copied from class:OGCGeometry
Converts this Geometry to the OGCMulti* if it is not OGCMulti* or OGCGeometryCollection already.- Specified by:
convertToMulti
in classOGCGeometry
- Returns:
- OGCMulti* or OGCGeometryCollection instance.
-
reduceFromMulti
Description copied from class: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. If OGCConcretGeometryCollection is empty, returns self.- Specified by:
reduceFromMulti
in classOGCGeometry
- Returns:
- A reduced geometry or this.
-
asJson
- Overrides:
asJson
in classOGCGeometry
- Returns:
- Convert to REST JSON.
-
equals
- Overrides:
equals
in classOGCGeometry
-
hashCode
public int hashCode()- Overrides:
hashCode
in classOGCGeometry
-
distance
- Overrides:
distance
in classOGCGeometry
-
overlaps
- Overrides:
overlaps
in classOGCGeometry
-
touches
- Overrides:
touches
in classOGCGeometry
-
crosses
- Overrides:
crosses
in classOGCGeometry
-
relate
- Overrides:
relate
in classOGCGeometry
-
disjoint
- Overrides:
disjoint
in classOGCGeometry
-
contains
- Overrides:
contains
in classOGCGeometry
-
Equals
Description copied from class:OGCGeometry
OGC equals. Performs topological comparison with tolerance. This is different from equals(Object), that uses exact comparison.- Overrides:
Equals
in classOGCGeometry
-
toGeometryCollection
-
toList
-
difference
- Overrides:
difference
in classOGCGeometry
-
intersection
- Overrides:
intersection
in classOGCGeometry
-
symDifference
- Overrides:
symDifference
in classOGCGeometry
-
isFlattened
public boolean isFlattened()Checks if collection is flattened.- Returns:
- True for the flattened collection. A flattened collection contains up to three non-empty geometries: an OGCMultiPoint, an OGCMultiPolygon, and an OGCMultiLineString.
-
flatten
Flattens Geometry Collection. The result collection contains up to three geometries: an OGCMultiPoint, an OGCMultilineString, and an OGCMultiPolygon (in that order).- Returns:
- A flattened Geometry Collection, or self if already flattened.
-
flattenAndRemoveOverlaps
Fixes topological overlaps in the GeometryCollecion. This is equivalent to union of the geometry collection elements. TODO "flattened" collection is supposed to contain only mutli-geometries, but this method may return single geometries e.g. for GEOMETRYCOLLECTION (LINESTRING (...)) it returns GEOMETRYCOLLECTION (LINESTRING (...)) and not GEOMETRYCOLLECTION (MULTILINESTRING (...))- Returns:
- A geometry collection that is flattened and has no overlapping elements.
-
removeOverlapsHelper_
-
prepare_for_ops_
-