Class GeoPackageGeometryData


  • public class GeoPackageGeometryData
    extends Object
    GeoPackage Geometry Data
    Author:
    osbornb
    • Constructor Detail

      • GeoPackageGeometryData

        public GeoPackageGeometryData()
        Default Constructor, default SRS Id of getDefaultSrsId()
        Since:
        4.0.0
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(Geometry geometry)
        Constructor, default SRS Id of getDefaultSrsId()
        Parameters:
        geometry - geometry
        Since:
        4.0.0
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(Geometry geometry,
                                      boolean buildEnvelope)
        Constructor
        Parameters:
        geometry - geometry
        buildEnvelope - true to build and set the envelope
        Since:
        4.0.0
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(long srsId)
        Constructor
        Parameters:
        srsId - SRS id
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(long srsId,
                                      Geometry geometry)
        Constructor
        Parameters:
        srsId - SRS id
        geometry - geometry
        Since:
        4.0.0
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(long srsId,
                                      Geometry geometry,
                                      boolean buildEnvelope)
        Constructor
        Parameters:
        srsId - SRS id
        geometry - geometry
        buildEnvelope - true to build and set the envelope
        Since:
        4.0.0
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(Geometry geometry,
                                      GeometryEnvelope envelope)
        Constructor, default SRS Id of getDefaultSrsId()
        Parameters:
        geometry - geometry
        envelope - geometry envelope
        Since:
        4.0.0
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(long srsId,
                                      Geometry geometry,
                                      GeometryEnvelope envelope)
        Constructor
        Parameters:
        srsId - SRS id
        geometry - geometry
        envelope - geometry envelope
        Since:
        4.0.0
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(GeoPackageGeometryData geometryData)
        Copy Constructor
        Parameters:
        geometryData - geometry data
        Since:
        4.0.0
      • GeoPackageGeometryData

        public GeoPackageGeometryData​(byte[] bytes)
        Constructor
        Parameters:
        bytes - geometry bytes
    • Method Detail

      • getGeometryFilter

        public static GeometryFilter getGeometryFilter()
        Get geometry filter
        Returns:
        geometry filter
        Since:
        4.0.0
      • setGeometryFilter

        public static void setGeometryFilter​(GeometryFilter geometryFilter)
        Set the geometry filter
        Parameters:
        geometryFilter - geometry filter
        Since:
        4.0.0
      • getDefaultSrsId

        public static int getDefaultSrsId()
        Get the default SRS id
        Returns:
        SRS id
        Since:
        4.0.0
      • setDefaultSrsId

        public static void setDefaultSrsId​(int defaultSrsId)
        Set the default SRS id
        Parameters:
        defaultSrsId - SRS id
        Since:
        4.0.0
      • getDefaultByteOrder

        public static ByteOrder getDefaultByteOrder()
        Get the default byte order
        Returns:
        byte order
        Since:
        4.0.0
      • setDefaultByteOrder

        public static void setDefaultByteOrder​(ByteOrder defaultByteOrder)
        Set the default byte order
        Parameters:
        defaultByteOrder - byte order
        Since:
        4.0.0
      • createAndBuildEnvelope

        public static GeoPackageGeometryData createAndBuildEnvelope​(Geometry geometry)
        Create geometry data and build the envelope, default SRS Id of getDefaultSrsId()
        Parameters:
        geometry - geometry
        Returns:
        geometry data
        Since:
        4.0.0
      • create

        public static GeoPackageGeometryData create​(long srsId)
        Create geometry data
        Parameters:
        srsId - SRS id
        Returns:
        geometry data
        Since:
        4.0.0
      • create

        public static GeoPackageGeometryData create​(long srsId,
                                                    Geometry geometry)
        Create geometry data
        Parameters:
        srsId - SRS id
        geometry - geometry
        Returns:
        geometry data
        Since:
        4.0.0
      • createAndBuildEnvelope

        public static GeoPackageGeometryData createAndBuildEnvelope​(long srsId,
                                                                    Geometry geometry)
        Create geometry data and build the envelope
        Parameters:
        srsId - SRS id
        geometry - geometry
        Returns:
        geometry data
        Since:
        4.0.0
      • createBuildEnvelopeAndWrite

        public static GeoPackageGeometryData createBuildEnvelopeAndWrite​(Geometry geometry)
                                                                  throws IOException
        Create geometry data, build the envelope, and write the GeoPackage geometry bytes, default SRS Id of getDefaultSrsId()
        Parameters:
        geometry - geometry
        Returns:
        geometry data
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • createAndWrite

        public static GeoPackageGeometryData createAndWrite​(long srsId,
                                                            Geometry geometry)
                                                     throws IOException
        Create geometry data and write the GeoPackage geometry bytes
        Parameters:
        srsId - SRS id
        geometry - geometry
        Returns:
        geometry data
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • createBuildEnvelopeAndWrite

        public static GeoPackageGeometryData createBuildEnvelopeAndWrite​(long srsId,
                                                                         Geometry geometry)
                                                                  throws IOException
        Create geometry data, build the envelope, and write the GeoPackage geometry bytes
        Parameters:
        srsId - SRS id
        geometry - geometry
        Returns:
        geometry data
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • create

        public static GeoPackageGeometryData create​(byte[] bytes)
        Create the geometry data from GeoPackage geometry bytes
        Parameters:
        bytes - GeoPackage geometry bytes
        Returns:
        geometry data
        Since:
        4.0.0
      • create

        public static GeoPackageGeometryData create​(long srsId,
                                                    Geometry geometry,
                                                    GeometryEnvelope envelope)
        Create the geometry data
        Parameters:
        srsId - SRS id
        geometry - geometry
        envelope - geometry envelope
        Returns:
        geometry data
        Since:
        4.0.0
      • createFromWkb

        public static GeoPackageGeometryData createFromWkb​(byte[] bytes)
                                                    throws IOException
        Create the geometry data from Well-Known Bytes, default SRS Id of getDefaultSrsId()
        Parameters:
        bytes - well-known bytes
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read bytes
        Since:
        4.0.0
      • createFromWkbAndBuildEnvelope

        public static GeoPackageGeometryData createFromWkbAndBuildEnvelope​(byte[] bytes)
                                                                    throws IOException
        Create the geometry data from Well-Known Bytes and build the envelope, default SRS Id of getDefaultSrsId()
        Parameters:
        bytes - well-known bytes
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read bytes
        Since:
        4.0.0
      • createFromWkb

        public static GeoPackageGeometryData createFromWkb​(long srsId,
                                                           byte[] bytes)
                                                    throws IOException
        Create the geometry data from Well-Known Bytes
        Parameters:
        srsId - SRS id
        bytes - well-known bytes
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read bytes
        Since:
        4.0.0
      • createFromWkbAndBuildEnvelope

        public static GeoPackageGeometryData createFromWkbAndBuildEnvelope​(long srsId,
                                                                           byte[] bytes)
                                                                    throws IOException
        Create the geometry data from Well-Known Bytes and build the envelope
        Parameters:
        srsId - SRS id
        bytes - well-known bytes
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read bytes
        Since:
        4.0.0
      • createFromWkbAndWrite

        public static GeoPackageGeometryData createFromWkbAndWrite​(byte[] bytes)
                                                            throws IOException
        Create the geometry data from Well-Known Bytes and write the GeoPackage geometry bytes, default SRS Id of getDefaultSrsId()
        Parameters:
        bytes - well-known bytes
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • createFromWkbBuildEnvelopeAndWrite

        public static GeoPackageGeometryData createFromWkbBuildEnvelopeAndWrite​(byte[] bytes)
                                                                         throws IOException
        Create the geometry data from Well-Known Bytes, build the envelope, and write the GeoPackage geometry bytes, default SRS Id of getDefaultSrsId()
        Parameters:
        bytes - well-known bytes
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • createFromWkbAndWrite

        public static GeoPackageGeometryData createFromWkbAndWrite​(long srsId,
                                                                   byte[] bytes)
                                                            throws IOException
        Create the geometry data from Well-Known Bytes and write the GeoPackage geometry bytes
        Parameters:
        srsId - SRS id
        bytes - well-known bytes
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • createFromWkbBuildEnvelopeAndWrite

        public static GeoPackageGeometryData createFromWkbBuildEnvelopeAndWrite​(long srsId,
                                                                                byte[] bytes)
                                                                         throws IOException
        Create the geometry data from Well-Known Bytes, build the envelope, and write the GeoPackage geometry bytes
        Parameters:
        srsId - SRS id
        bytes - well-known bytes
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • createGeometryFromWkb

        public static Geometry createGeometryFromWkb​(byte[] bytes)
                                              throws IOException
        Create a geometry from Well-Known Bytes
        Parameters:
        bytes - well-known bytes
        Returns:
        geometry
        Throws:
        IOException - upon failure to read bytes
        Since:
        4.0.0
      • createFromWktAndBuildEnvelope

        public static GeoPackageGeometryData createFromWktAndBuildEnvelope​(String text)
                                                                    throws IOException
        Create the geometry data from Well-Known Text and build the envelope, default SRS Id of getDefaultSrsId()
        Parameters:
        text - well-known text
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read text
        Since:
        4.0.0
      • createFromWkt

        public static GeoPackageGeometryData createFromWkt​(long srsId,
                                                           String text)
                                                    throws IOException
        Create the geometry data from Well-Known Text
        Parameters:
        srsId - SRS id
        text - well-known text
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read text
        Since:
        4.0.0
      • createFromWktAndBuildEnvelope

        public static GeoPackageGeometryData createFromWktAndBuildEnvelope​(long srsId,
                                                                           String text)
                                                                    throws IOException
        Create the geometry data from Well-Known Text and build the envelope
        Parameters:
        srsId - SRS id
        text - well-known text
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read text
        Since:
        4.0.0
      • createFromWktAndWrite

        public static GeoPackageGeometryData createFromWktAndWrite​(String text)
                                                            throws IOException
        Create the geometry data from Well-Known Text and write the GeoPackage geometry bytes, default SRS Id of getDefaultSrsId()
        Parameters:
        text - well-known text
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • createFromWktBuildEnvelopeAndWrite

        public static GeoPackageGeometryData createFromWktBuildEnvelopeAndWrite​(String text)
                                                                         throws IOException
        Create the geometry data from Well-Known Text, build the envelope, and write the GeoPackage geometry bytes, default SRS Id of getDefaultSrsId()
        Parameters:
        text - well-known text
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • createFromWktAndWrite

        public static GeoPackageGeometryData createFromWktAndWrite​(long srsId,
                                                                   String text)
                                                            throws IOException
        Create the geometry data from Well-Known Text and write the GeoPackage geometry bytes
        Parameters:
        srsId - SRS id
        text - well-known text
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • createFromWktBuildEnvelopeAndWrite

        public static GeoPackageGeometryData createFromWktBuildEnvelopeAndWrite​(long srsId,
                                                                                String text)
                                                                         throws IOException
        Create the geometry data from Well-Known Text, build the envelope, and write the GeoPackage geometry bytes
        Parameters:
        srsId - SRS id
        text - well-known text
        Returns:
        geometry data
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • createGeometryFromWkt

        public static Geometry createGeometryFromWkt​(String text)
                                              throws IOException
        Create a geometry from Well-Known Text
        Parameters:
        text - well-known text
        Returns:
        geometry
        Throws:
        IOException - upon failure to read text
        Since:
        4.0.0
      • bytes

        public static byte[] bytes​(Geometry geometry)
                            throws IOException
        GeoPackage geometry bytes from the geometry, default SRS Id of getDefaultSrsId()
        Parameters:
        geometry - geometry
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • bytesAndBuildEnvelope

        public static byte[] bytesAndBuildEnvelope​(Geometry geometry)
                                            throws IOException
        GeoPackage geometry bytes from the geometry with built envelope, default SRS Id of getDefaultSrsId()
        Parameters:
        geometry - geometry
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • bytes

        public static byte[] bytes​(long srsId,
                                   Geometry geometry)
                            throws IOException
        GeoPackage geometry bytes from the geometry
        Parameters:
        srsId - SRS id
        geometry - geometry
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • bytesAndBuildEnvelope

        public static byte[] bytesAndBuildEnvelope​(long srsId,
                                                   Geometry geometry)
                                            throws IOException
        GeoPackage geometry bytes from the geometry with built envelope
        Parameters:
        srsId - SRS id
        geometry - geometry
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • bytesFromWkb

        public static byte[] bytesFromWkb​(byte[] bytes)
                                   throws IOException
        GeoPackage geometry bytes from Well-Known bytes, default SRS Id of getDefaultSrsId()
        Parameters:
        bytes - well-known bytes
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • bytesFromWkbAndBuildEnvelope

        public static byte[] bytesFromWkbAndBuildEnvelope​(byte[] bytes)
                                                   throws IOException
        GeoPackage geometry bytes from Well-Known bytes with built envelope, default SRS Id of getDefaultSrsId()
        Parameters:
        bytes - well-known bytes
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • bytesFromWkb

        public static byte[] bytesFromWkb​(long srsId,
                                          byte[] bytes)
                                   throws IOException
        GeoPackage geometry bytes from Well-Known bytes
        Parameters:
        srsId - SRS id
        bytes - well-known bytes
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • bytesFromWkbAndBuildEnvelope

        public static byte[] bytesFromWkbAndBuildEnvelope​(long srsId,
                                                          byte[] bytes)
                                                   throws IOException
        GeoPackage geometry bytes from Well-Known bytes with built envelope
        Parameters:
        srsId - SRS id
        bytes - well-known bytes
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • bytesFromWkt

        public static byte[] bytesFromWkt​(String text)
                                   throws IOException
        GeoPackage geometry bytes from Well-Known text, default SRS Id of getDefaultSrsId()
        Parameters:
        text - well-known text
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • bytesFromWktAndBuildEnvelope

        public static byte[] bytesFromWktAndBuildEnvelope​(String text)
                                                   throws IOException
        GeoPackage geometry bytes from Well-Known text with built envelope, default SRS Id of getDefaultSrsId()
        Parameters:
        text - well-known text
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • bytesFromWkt

        public static byte[] bytesFromWkt​(long srsId,
                                          String text)
                                   throws IOException
        GeoPackage geometry bytes from Well-Known text
        Parameters:
        srsId - SRS id
        text - well-known text
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • bytesFromWktAndBuildEnvelope

        public static byte[] bytesFromWktAndBuildEnvelope​(long srsId,
                                                          String text)
                                                   throws IOException
        GeoPackage geometry bytes from Well-Known text with built envelope
        Parameters:
        srsId - SRS id
        text - well-known text
        Returns:
        GeoPackage geometry bytes
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • wkb

        public static byte[] wkb​(GeoPackageGeometryData geometryData)
                          throws IOException
        Well-Known Bytes from the geometry data
        Parameters:
        geometryData - geometry data
        Returns:
        well-known bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • wkb

        public static byte[] wkb​(Geometry geometry)
                          throws IOException
        Well-Known Bytes from the geometry
        Parameters:
        geometry - geometry
        Returns:
        well-known bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • wkb

        public static byte[] wkb​(byte[] bytes)
                          throws IOException
        Well-Known Bytes from GeoPackage geometry bytes
        Parameters:
        bytes - GeoPackage geometry bytes
        Returns:
        well-known bytes
        Throws:
        IOException - upon failure to read or write bytes
        Since:
        4.0.0
      • wkbFromWkt

        public static byte[] wkbFromWkt​(String text)
                                 throws IOException
        Well-Known Bytes from Well-Known Text
        Parameters:
        text - well-known text
        Returns:
        well-known bytes
        Throws:
        IOException - upon failure to read text or write bytes
        Since:
        4.0.0
      • wkt

        public static String wkt​(GeoPackageGeometryData geometryData)
                          throws IOException
        Well-Known Text from the geometry data
        Parameters:
        geometryData - geometry data
        Returns:
        well-known text
        Throws:
        IOException - upon failure to write text
        Since:
        4.0.0
      • wkt

        public static String wkt​(Geometry geometry)
                          throws IOException
        Well-Known Text from the geometry
        Parameters:
        geometry - geometry
        Returns:
        well-known text
        Throws:
        IOException - upon failure to write text
        Since:
        4.0.0
      • wkt

        public static String wkt​(byte[] bytes)
                          throws IOException
        Well-Known Text from GeoPackage Geometry Bytes
        Parameters:
        bytes - GeoPackage geometry bytes
        Returns:
        well-known text
        Throws:
        IOException - upon failure to write text
        Since:
        4.0.0
      • wktFromWkb

        public static String wktFromWkb​(byte[] bytes)
                                 throws IOException
        Well-Known Text from Well-Known Bytes
        Parameters:
        bytes - well-known bytes
        Returns:
        well-known text
        Throws:
        IOException - upon failure to write text
        Since:
        4.0.0
      • fromBytes

        public void fromBytes​(byte[] bytes)
        Populate the geometry data from the bytes
        Parameters:
        bytes - geometry bytes
      • toBytes

        public byte[] toBytes()
                       throws IOException
        Write the geometry to bytes
        Returns:
        bytes
        Throws:
        IOException - upon failure to write bytes
      • isExtended

        public boolean isExtended()
        Is the geometry extended
        Returns:
        true if extended
      • isEmpty

        public boolean isEmpty()
        Is the geometry empty
        Returns:
        true if empty
      • getByteOrder

        public ByteOrder getByteOrder()
        Get the byte order
        Returns:
        byte order
      • getSrsId

        public int getSrsId()
        Get the SRS id
        Returns:
        SRS id
      • getEnvelope

        public GeometryEnvelope getEnvelope()
        Get the geometry envelope
        Returns:
        geometry envelope
      • getBoundingBox

        public BoundingBox getBoundingBox()
        Get the bounding box of the geometry envelope
        Returns:
        bounding box
        Since:
        6.2.0
      • getGeometry

        public Geometry getGeometry()
        Get the geometry
        Returns:
        geometry
      • getOrReadGeometry

        public Geometry getOrReadGeometry()
                                   throws IOException
        Get the geometry or read it from geometry bytes
        Returns:
        geometry
        Throws:
        IOException - upon failure to read geometry bytes
        Since:
        6.3.0
      • setExtended

        public void setExtended​(boolean extended)
        Set the extended flag
        Parameters:
        extended - extended value
      • setEmpty

        public void setEmpty​(boolean empty)
        Set the empty flag
        Parameters:
        empty - empty value
      • setByteOrder

        public void setByteOrder​(ByteOrder byteOrder)
        Set the byte order
        Parameters:
        byteOrder - byte order
      • setSrsId

        public void setSrsId​(int srsId)
        Set the SRS id
        Parameters:
        srsId - SRS id
      • setEnvelope

        public void setEnvelope​(GeometryEnvelope envelope)
        Set the geometry envelope
        Parameters:
        envelope - geometry envelope
      • setBytes

        public void setBytes​(byte[] bytes)
        Set the bytes
        Parameters:
        bytes - bytes
        Since:
        6.3.0
      • setBytes

        public void setBytes​(byte[] bytes,
                             int wkbGeometryIndex)
        Set the bytes
        Parameters:
        bytes - bytes
        wkbGeometryIndex - well-known geometry bytes start index
        Since:
        6.3.0
      • setHeaderBytes

        public void setHeaderBytes​(byte[] bytes)
        Set the geometry header bytes
        Parameters:
        bytes - header bytes
        Since:
        6.3.0
      • setGeometryBytes

        public void setGeometryBytes​(byte[] bytes)
        Set the geometry bytes. Updates the empty flag. Extended flag should be manually set with setExtended(boolean) as needed.
        Parameters:
        bytes - geometry bytes
        Since:
        6.3.0
      • setGeometryToBytes

        public byte[] setGeometryToBytes​(Geometry geometry)
                                  throws IOException
        Set the geometry and write to bytes
        Parameters:
        geometry - geometry
        Returns:
        geometry bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • setGeometryAndBuildEnvelopeToBytes

        public byte[] setGeometryAndBuildEnvelopeToBytes​(Geometry geometry)
                                                  throws IOException
        Set the geometry, build the envelope, and write to bytes
        Parameters:
        geometry - geometry
        Returns:
        geometry bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • setGeometryFromWkb

        public void setGeometryFromWkb​(byte[] bytes)
                                throws IOException
        Set the geometry from Well-Known bytes
        Parameters:
        bytes - well-known bytes
        Throws:
        IOException - upon failure to read bytes
        Since:
        4.0.0
      • setGeometryFromWkt

        public void setGeometryFromWkt​(String text)
                                throws IOException
        Set the geometry from Well-Known text
        Parameters:
        text - well-known text
        Throws:
        IOException - upon failure to read text
        Since:
        4.0.0
      • clearBytes

        public void clearBytes()
        Clear the bytes
        Since:
        6.3.0
      • clearHeaderBytes

        public void clearHeaderBytes()
        Clear the header bytes and overall bytes
        Since:
        6.3.0
      • clearGeometryBytes

        public void clearGeometryBytes()
        Clear the geometry bytes and overall bytes
        Since:
        6.3.0
      • getBytes

        public byte[] getBytes()
                        throws IOException
        Get the bytes of the entire GeoPackage geometry including GeoPackage header and WKB bytes
        Returns:
        bytes
        Throws:
        IOException - upon failure to write bytes
      • getByteBuffer

        public ByteBuffer getByteBuffer()
                                 throws IOException
        Get the bytes already ordered in a Byte Buffer
        Returns:
        byte buffer
        Throws:
        IOException - upon failure to write bytes
        Since:
        6.3.0
      • getHeaderBytes

        public byte[] getHeaderBytes()
                              throws IOException
        Get the GeoPackage header bytes
        Returns:
        header bytes
        Throws:
        IOException - upon failure to write bytes
      • getHeaderByteBuffer

        public ByteBuffer getHeaderByteBuffer()
                                       throws IOException
        Get the GeoPackage header bytes already ordered in a Byte Buffer
        Returns:
        byte buffer
        Throws:
        IOException - upon failure to write bytes
      • getWkb

        public byte[] getWkb()
                      throws IOException
        Get the Well-Known Binary Geometry bytes
        Returns:
        bytes
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • getWkbBuffer

        public ByteBuffer getWkbBuffer()
                                throws IOException
        Get the Well-Known Binary Geometry bytes already ordered in a Byte Buffer
        Returns:
        byte buffer
        Throws:
        IOException - upon failure to write bytes
        Since:
        4.0.0
      • getWkbGeometryIndex

        public int getWkbGeometryIndex()
        Return the byte index where the Well-Known Binary bytes start
        Returns:
        index
      • getWkt

        public String getWkt()
        Get a Well-Known text string from the geometry
        Returns:
        well-known text string
        Since:
        4.0.0
      • getOrBuildEnvelope

        public GeometryEnvelope getOrBuildEnvelope()
        Get the envelope if it exists or build, set, and retrieve it from the geometry
        Returns:
        geometry envelope
        Since:
        3.1.0
      • buildEnvelope

        public GeometryEnvelope buildEnvelope()
        Build, set, and retrieve the envelope from the geometry
        Returns:
        geometry envelope
        Since:
        4.0.0
      • getOrBuildBoundingBox

        public BoundingBox getOrBuildBoundingBox()
        Get the bounding box of the geometry envelope if it exists or build, set and retrieve it from the geometry
        Returns:
        bounding box
        Since:
        6.2.0
      • getIndicator

        public static int getIndicator​(GeometryEnvelope envelope)
        Get the envelope flag indicator

        1 for xy, 2 for xyz, 3 for xym, 4 for xyzm (null would be 0)

        Parameters:
        envelope - geometry envelope
        Returns:
        indicator
      • transform

        public GeoPackageGeometryData transform​(ProjectionTransform transform)
        Transform the geometry data using the provided projection transform
        Parameters:
        transform - projection transform
        Returns:
        transformed geometry data
        Since:
        4.0.0
      • transform

        public GeoPackageGeometryData transform​(GeometryTransform transform)
        Transform the geometry data using the provided geometry projection transform
        Parameters:
        transform - geometry projection transform
        Returns:
        transformed geometry data
        Since:
        6.0.0