Class OGCConcreteGeometryCollection

    • Field Detail

      • TYPE

        public static java.lang.String TYPE
    • Method Detail

      • 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 of SpatialReference are expected to be shared among geometry objects.

        Specified by:
        estimateMemorySize in class OGCGeometry
        Returns:
        Returns an estimate of this object size in bytes.
      • 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 class OGCGeometry
        Returns:
        True if geometry is simple and false otherwise. Note: If isSimple is true, then isSimpleRelaxed is true too.
      • makeSimple

        public OGCGeometry makeSimple()
        makeSimpleRelaxed is not supported for the GeometryCollection instance.
        Overrides:
        makeSimple in class OGCGeometry
        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 class OGCGeometry
        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

        public OGCGeometry makeSimpleRelaxed​(boolean forceProcessing)
        makeSimpleRelaxed is not supported for the GeometryCollection instance.
        Overrides:
        makeSimpleRelaxed in class OGCGeometry
        Returns:
        Returns simplified geometry. Note: isSimpleRelaxed should return true after this operation.
      • convertToMulti

        public OGCGeometry convertToMulti()
        Description copied from class: OGCGeometry
        Converts this Geometry to the OGCMulti* if it is not OGCMulti* or OGCGeometryCollection already.
        Specified by:
        convertToMulti in class OGCGeometry
        Returns:
        OGCMulti* or OGCGeometryCollection instance.
      • reduceFromMulti

        public OGCGeometry 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 class OGCGeometry
        Returns:
        A reduced geometry or this.
      • asJson

        public java.lang.String asJson()
        Overrides:
        asJson in class OGCGeometry
        Returns:
        Convert to REST JSON.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class OGCGeometry
      • Equals

        public boolean Equals​(OGCGeometry another)
        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 class OGCGeometry
      • 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

        public OGCConcreteGeometryCollection 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

        public OGCConcreteGeometryCollection 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.