Class GeoSet

java.lang.Object
types.collections.base.Set<org.locationtech.jts.geom.Geometry>
types.collections.geo.GeoSet
All Implemented Interfaces:
Base, Collection, TemporalObject
Direct Known Subclasses:
GeographySet, GeometrySet

public abstract class GeoSet extends Set<org.locationtech.jts.geom.Geometry>
Abstract class representing a set of geo object inheriting from set type.
Since:
10/09/2023
Author:
Nidhal Mareghni
  • Field Details

    • _inner

      protected jnr.ffi.Pointer _inner
  • Constructor Details

    • GeoSet

      public GeoSet()
    • GeoSet

      public GeoSet(jnr.ffi.Pointer inner)
      Pointer constructor
      Parameters:
      inner - Pointer
    • GeoSet

      public GeoSet(String value)
      The string constructor
      Parameters:
      value - - the string with the TBoolInst value
  • Method Details

    • createInner

      public abstract jnr.ffi.Pointer createInner(jnr.ffi.Pointer inner)
      Specified by:
      createInner in class Set<org.locationtech.jts.geom.Geometry>
    • createStringInner

      public abstract jnr.ffi.Pointer createStringInner(String str)
      Specified by:
      createStringInner in class Set<org.locationtech.jts.geom.Geometry>
    • factory

      public static GeoSet factory(String type, jnr.ffi.Pointer inner)
    • toString

      public String toString()
      Return the string representation of the content of "this".

      MEOS Functions:

    • geoset_out
    • Overrides:
      toString in class Object
      Returns:
      A new String instance
    • as_ewkt

      protected String as_ewkt()
      Returns the EWKT representation of "this". MEOS Functions:
    • geoset_as_ewkt
    • Returns:
      A String instance.
    • as_wkt

      protected String as_wkt()
      Returns the WKT representation of "this". MEOS Functions:
    • geoset_as_text
    • Returns:
      A String instance.
    • as_text

      protected String as_text()
      Returns the WKT representation of "this". MEOS Functions:
    • geoset_as_text
    • Returns:
      A String instance.
    • get_inner

      public abstract jnr.ffi.Pointer get_inner()
      Specified by:
      get_inner in class Set<org.locationtech.jts.geom.Geometry>
    • start_element

      public org.locationtech.jts.geom.Geometry start_element() throws org.locationtech.jts.io.ParseException
      Returns the first element in "this".

      MEOS Functions:

    • geoset_start_value
    • Specified by:
      start_element in class Set<org.locationtech.jts.geom.Geometry>
      Returns:
      A Geometry instance
      Throws:
      org.locationtech.jts.io.ParseException
    • end_element

      public org.locationtech.jts.geom.Geometry end_element() throws org.locationtech.jts.io.ParseException
      Returns the last element in "this".

      MEOS Functions:

    • geoset_end_value
    • Specified by:
      end_element in class Set<org.locationtech.jts.geom.Geometry>
      Returns:
      A Geometry instance
      Throws:
      org.locationtech.jts.io.ParseException
    • srid

      protected int srid()
      Returns the SRID of "this". MEOS Functions:
    • geoset_srid
    • Returns:
      An integer
    • contains

      public boolean contains(GeoSet other) throws Exception
      Throws:
      Exception
    • intersection_geom

      public org.locationtech.jts.geom.Geometry intersection_geom(org.locationtech.jts.geom.Geometry geom) throws org.locationtech.jts.io.ParseException
      Returns the intersection of "this" and "other".

      MEOS Functions:

    • intersection_geoset_geo
    • intersection_set_set
    • Parameters:
      geom - A GeoSet or Geometry instance
      Returns:
      An object of the same type as "other" or "None" if the intersection is empty.
      Throws:
      org.locationtech.jts.io.ParseException
    • intersection_geoset

      public GeoSet intersection_geoset(GeoSet geo, String type)
      Returns the intersection of "this" and "other".

      MEOS Functions:

    • intersection_geoset_geo
    • intersection_set_set
    • Parameters:
      geo - A GeoSet or Geometry instance
      type - the type of GeoSet
      Returns:
      An object of the same type as "other" or "None" if the intersection is empty.
      Throws:
      org.locationtech.jts.io.ParseException
    • minus

      public GeoSet minus(Object geo, String type)
      Returns the difference of "this" and "other".

      MEOS Functions:

    • minus_geoset_geo
    • minus_set_set
    • Parameters:
      geo - A GeoSet or Geometry instance
      type - the type of GeoSet
      Returns:
      A GeoSet instance or "null" if the difference is empty.
    • subtract_from

      public org.locationtech.jts.geom.Geometry subtract_from(Object geo, String type) throws org.locationtech.jts.io.ParseException
      Throws:
      org.locationtech.jts.io.ParseException
    • union

      public GeoSet union(Object geo, String type)
      Returns the union of "this" and "other".

      MEOS Functions:

    • union_geoset_geo
    • union_set_set
    • Parameters:
      geo - A GeoSet or Geometry instance
      type - the type of GeoSet
      Returns:
      A GeoSet instance.
    • round

      public GeoSet round(int decimals, String type)
      Rounds the coordinate values to a number of decimal places.

      MEOS Functions:

    • tpoint_roundgeoset_round
    • Parameters:
      decimals - The number of decimal places to use for the coordinates.
      type - the type of GeoSet
      Returns:
      A new GeoSet object of the same subtype of "this".