Package org.cugos.wkg

Class Geometry

    • Field Detail

      • srid

        protected String srid
        The SRID
      • dimension

        protected final Dimension dimension
        The Dimension
      • data

        protected Object data
        The data property
    • Constructor Detail

      • Geometry

        protected Geometry​(Dimension dimension,
                           String srid)
        Create a new Geometry with Dimension and SRID
        Parameters:
        dimension - The Dimension
        srid - The SRID
    • Method Detail

      • isEmpty

        public abstract boolean isEmpty()
        Is this Geometry empty?
        Returns:
        Whether the Geometry is empty
      • getNumberOfCoordinates

        public abstract int getNumberOfCoordinates()
        Get the number of coordinates
        Returns:
        The number of coordinates
      • getCoordinates

        public abstract List<Coordinate> getCoordinates()
        Get a List of all coordinates
        Returns:
        A List of all coordinates
      • getEnvelope

        public Envelope getEnvelope()
        Get the bounding Envelope
        Returns:
        The bounding Envelope
      • getSrid

        public String getSrid()
        Get the SRID which often is null
        Returns:
        The SRID
      • setSrid

        public Geometry setSrid​(String srid)
        Set the SRID for this GeometryType
        Parameters:
        srid - The SRID
        Returns:
        This Geometry
      • getData

        public Object getData()
        Get the data
        Returns:
        The data
      • setData

        public Geometry setData​(Object data)
        Set the data
        Parameters:
        data - The data
        Returns:
        This Geometry
      • getDimension

        public Dimension getDimension()
        Get the Dimension
        Returns:
        The Dimension
      • toString

        public String toString()
        Write the Geometry to WKT
        Overrides:
        toString in class Object
        Returns:
        The WKT of the Geometry