public class GeoPackageGeometryData extends Object
| Constructor and Description |
|---|
GeoPackageGeometryData()
Default Constructor, default SRS Id of
getDefaultSrsId() |
GeoPackageGeometryData(byte[] bytes)
Constructor
|
GeoPackageGeometryData(Geometry geometry)
Constructor, default SRS Id of
getDefaultSrsId() |
GeoPackageGeometryData(Geometry geometry,
boolean buildEnvelope)
Constructor
|
GeoPackageGeometryData(Geometry geometry,
GeometryEnvelope envelope)
Constructor, default SRS Id of
getDefaultSrsId() |
GeoPackageGeometryData(GeoPackageGeometryData geometryData)
Copy Constructor
|
GeoPackageGeometryData(long srsId)
Constructor
|
GeoPackageGeometryData(long srsId,
Geometry geometry)
Constructor
|
GeoPackageGeometryData(long srsId,
Geometry geometry,
boolean buildEnvelope)
Constructor
|
GeoPackageGeometryData(long srsId,
Geometry geometry,
GeometryEnvelope envelope)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
GeometryEnvelope |
buildEnvelope()
Build, set, and retrieve the envelope from the geometry
|
static byte[] |
bytes(Geometry geometry)
GeoPackage geometry bytes from the geometry, default SRS Id of
getDefaultSrsId() |
static byte[] |
bytes(long srsId,
Geometry geometry)
GeoPackage geometry bytes from the geometry
|
static byte[] |
bytesAndBuildEnvelope(Geometry geometry)
GeoPackage geometry bytes from the geometry with built envelope, default
SRS Id of
getDefaultSrsId() |
static byte[] |
bytesAndBuildEnvelope(long srsId,
Geometry geometry)
GeoPackage geometry bytes from the geometry with built envelope
|
static byte[] |
bytesFromWkb(byte[] bytes)
GeoPackage geometry bytes from Well-Known bytes, default SRS Id of
getDefaultSrsId() |
static byte[] |
bytesFromWkb(long srsId,
byte[] bytes)
GeoPackage geometry bytes from Well-Known bytes
|
static byte[] |
bytesFromWkbAndBuildEnvelope(byte[] bytes)
GeoPackage geometry bytes from Well-Known bytes with built envelope,
default SRS Id of
getDefaultSrsId() |
static byte[] |
bytesFromWkbAndBuildEnvelope(long srsId,
byte[] bytes)
GeoPackage geometry bytes from Well-Known bytes with built envelope
|
static byte[] |
bytesFromWkt(long srsId,
String text)
GeoPackage geometry bytes from Well-Known text
|
static byte[] |
bytesFromWkt(String text)
GeoPackage geometry bytes from Well-Known text, default SRS Id of
getDefaultSrsId() |
static byte[] |
bytesFromWktAndBuildEnvelope(long srsId,
String text)
GeoPackage geometry bytes from Well-Known text with built envelope
|
static byte[] |
bytesFromWktAndBuildEnvelope(String text)
GeoPackage geometry bytes from Well-Known text with built envelope,
default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
create()
Create geometry data, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
create(byte[] bytes)
Create the geometry data from GeoPackage geometry bytes
|
static GeoPackageGeometryData |
create(Geometry geometry)
Create geometry data, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
create(Geometry geometry,
GeometryEnvelope envelope)
Create the geometry data, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
create(GeoPackageGeometryData geometryData)
Copy the geometry data and create
|
static GeoPackageGeometryData |
create(long srsId)
Create geometry data
|
static GeoPackageGeometryData |
create(long srsId,
Geometry geometry)
Create geometry data
|
static GeoPackageGeometryData |
create(long srsId,
Geometry geometry,
GeometryEnvelope envelope)
Create the geometry data
|
static GeoPackageGeometryData |
createAndBuildEnvelope(Geometry geometry)
Create geometry data and build the envelope, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createAndBuildEnvelope(long srsId,
Geometry geometry)
Create geometry data and build the envelope
|
static GeoPackageGeometryData |
createAndWrite(Geometry geometry)
Create geometry data and write the GeoPackage geometry bytes, default SRS
Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createAndWrite(long srsId,
Geometry geometry)
Create geometry data and write the GeoPackage geometry bytes
|
static GeoPackageGeometryData |
createBuildEnvelopeAndWrite(Geometry geometry)
Create geometry data, build the envelope, and write the GeoPackage
geometry bytes, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createBuildEnvelopeAndWrite(long srsId,
Geometry geometry)
Create geometry data, build the envelope, and write the GeoPackage
geometry bytes
|
static GeoPackageGeometryData |
createFromWkb(byte[] bytes)
Create the geometry data from Well-Known Bytes, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createFromWkb(long srsId,
byte[] bytes)
Create the geometry data from Well-Known Bytes
|
static GeoPackageGeometryData |
createFromWkbAndBuildEnvelope(byte[] bytes)
Create the geometry data from Well-Known Bytes and build the envelope,
default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createFromWkbAndBuildEnvelope(long srsId,
byte[] bytes)
Create the geometry data from Well-Known Bytes and build the envelope
|
static GeoPackageGeometryData |
createFromWkbAndWrite(byte[] bytes)
Create the geometry data from Well-Known Bytes and write the GeoPackage
geometry bytes, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createFromWkbAndWrite(long srsId,
byte[] bytes)
Create the geometry data from Well-Known Bytes and write the GeoPackage
geometry bytes
|
static GeoPackageGeometryData |
createFromWkbBuildEnvelopeAndWrite(byte[] bytes)
Create the geometry data from Well-Known Bytes, build the envelope, and
write the GeoPackage geometry bytes, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createFromWkbBuildEnvelopeAndWrite(long srsId,
byte[] bytes)
Create the geometry data from Well-Known Bytes, build the envelope, and
write the GeoPackage geometry bytes
|
static GeoPackageGeometryData |
createFromWkt(long srsId,
String text)
Create the geometry data from Well-Known Text
|
static GeoPackageGeometryData |
createFromWkt(String text)
Create the geometry data from Well-Known Text, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createFromWktAndBuildEnvelope(long srsId,
String text)
Create the geometry data from Well-Known Text and build the envelope
|
static GeoPackageGeometryData |
createFromWktAndBuildEnvelope(String text)
Create the geometry data from Well-Known Text and build the envelope,
default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createFromWktAndWrite(long srsId,
String text)
Create the geometry data from Well-Known Text and write the GeoPackage
geometry bytes
|
static GeoPackageGeometryData |
createFromWktAndWrite(String text)
Create the geometry data from Well-Known Text and write the GeoPackage
geometry bytes, default SRS Id of
getDefaultSrsId() |
static GeoPackageGeometryData |
createFromWktBuildEnvelopeAndWrite(long srsId,
String text)
Create the geometry data from Well-Known Text, build the envelope, and
write the GeoPackage geometry bytes
|
static GeoPackageGeometryData |
createFromWktBuildEnvelopeAndWrite(String text)
Create the geometry data from Well-Known Text, build the envelope, and
write the GeoPackage geometry bytes, default SRS Id of
getDefaultSrsId() |
static Geometry |
createGeometryFromWkb(byte[] bytes)
Create a geometry from Well-Known Bytes
|
static Geometry |
createGeometryFromWkt(String text)
Create a geometry from Well-Known Text
|
void |
fromBytes(byte[] bytes)
Populate the geometry data from the bytes
|
ByteOrder |
getByteOrder()
Get the byte order
|
byte[] |
getBytes()
Get the bytes of the entire GeoPackage geometry including GeoPackage
header and WKB bytes
|
static ByteOrder |
getDefaultByteOrder()
Get the default byte order
|
static int |
getDefaultSrsId()
Get the default SRS id
|
GeometryEnvelope |
getEnvelope()
Get the geometry envelope
|
Geometry |
getGeometry()
Get the geometry
|
static GeometryFilter |
getGeometryFilter()
Get geometry filter
|
ByteBuffer |
getHeaderByteBuffer()
Get the GeoPackage header bytes already ordered in a Byte Buffer
|
byte[] |
getHeaderBytes()
Get the GeoPackage header bytes
|
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)
|
GeometryEnvelope |
getOrBuildEnvelope()
Get the envelope if it exists or build, set, and retrieve it from the
geometry
|
int |
getSrsId()
Get the SRS id
|
byte[] |
getWkb()
Get the Well-Known Binary Geometry bytes
|
ByteBuffer |
getWkbBuffer()
Get the Well-Known Binary Geometry bytes already ordered in a Byte Buffer
|
int |
getWkbGeometryIndex()
Return the byte index where the Well-Known Binary bytes start
|
String |
getWkt()
Get a Well-Known text string from the geometry
|
boolean |
isEmpty()
Is the geometry empty
|
boolean |
isExtended()
Is the geometry extended
|
void |
setByteOrder(ByteOrder byteOrder)
Set the byte order
|
static void |
setDefaultByteOrder(ByteOrder defaultByteOrder)
Set the default byte order
|
static void |
setDefaultSrsId(int defaultSrsId)
Set the default SRS id
|
void |
setEmpty(boolean empty)
Set the empty flag
|
void |
setEnvelope(GeometryEnvelope envelope)
Set the geometry envelope
|
void |
setExtended(boolean extended)
Set the extended flag
|
void |
setGeometry(Geometry geometry)
Set the geometry.
|
byte[] |
setGeometryAndBuildEnvelopeToBytes(Geometry geometry)
Set the geometry, build the envelope, and write to bytes
|
static void |
setGeometryFilter(GeometryFilter geometryFilter)
Set the geometry filter
|
void |
setGeometryFromWkb(byte[] bytes)
Set the geometry from Well-Known bytes
|
void |
setGeometryFromWkt(String text)
Set the geometry from Well-Known text
|
byte[] |
setGeometryToBytes(Geometry geometry)
Set the geometry and write to bytes
|
void |
setSrsId(int srsId)
Set the SRS id
|
byte[] |
toBytes()
Write the geometry to bytes
|
GeoPackageGeometryData |
transform(ProjectionTransform transform)
Transform the geometry data using the provided projection transform
|
static byte[] |
wkb(byte[] bytes)
Well-Known Bytes from GeoPackage geometry bytes
|
static byte[] |
wkb(Geometry geometry)
Well-Known Bytes from the geometry
|
static byte[] |
wkb(GeoPackageGeometryData geometryData)
Well-Known Bytes from the geometry data
|
static byte[] |
wkbFromWkt(String text)
Well-Known Bytes from Well-Known Text
|
static String |
wkt(byte[] bytes)
Well-Known Text from GeoPackage Geometry Bytes
|
static String |
wkt(Geometry geometry)
Well-Known Text from the geometry
|
static String |
wkt(GeoPackageGeometryData geometryData)
Well-Known Text from the geometry data
|
static String |
wktFromWkb(byte[] bytes)
Well-Known Text from Well-Known Bytes
|
public GeoPackageGeometryData()
getDefaultSrsId()public GeoPackageGeometryData(Geometry geometry)
getDefaultSrsId()geometry - geometrypublic GeoPackageGeometryData(Geometry geometry, boolean buildEnvelope)
geometry - geometrybuildEnvelope - true to build and set the envelopepublic GeoPackageGeometryData(long srsId)
srsId - SRS idpublic GeoPackageGeometryData(long srsId,
Geometry geometry)
srsId - SRS idgeometry - geometrypublic GeoPackageGeometryData(long srsId,
Geometry geometry,
boolean buildEnvelope)
srsId - SRS idgeometry - geometrybuildEnvelope - true to build and set the envelopepublic GeoPackageGeometryData(Geometry geometry, GeometryEnvelope envelope)
getDefaultSrsId()geometry - geometryenvelope - geometry envelopepublic GeoPackageGeometryData(long srsId,
Geometry geometry,
GeometryEnvelope envelope)
srsId - SRS idgeometry - geometryenvelope - geometry envelopepublic GeoPackageGeometryData(GeoPackageGeometryData geometryData)
geometryData - geometry datapublic GeoPackageGeometryData(byte[] bytes)
bytes - geometry bytespublic static GeometryFilter getGeometryFilter()
public static void setGeometryFilter(GeometryFilter geometryFilter)
geometryFilter - geometry filterpublic static int getDefaultSrsId()
public static void setDefaultSrsId(int defaultSrsId)
defaultSrsId - SRS idpublic static ByteOrder getDefaultByteOrder()
public static void setDefaultByteOrder(ByteOrder defaultByteOrder)
defaultByteOrder - byte orderpublic static GeoPackageGeometryData create()
getDefaultSrsId()public static GeoPackageGeometryData create(Geometry geometry)
getDefaultSrsId()geometry - geometrypublic static GeoPackageGeometryData createAndBuildEnvelope(Geometry geometry)
getDefaultSrsId()geometry - geometrypublic static GeoPackageGeometryData create(long srsId)
srsId - SRS idpublic static GeoPackageGeometryData create(long srsId, Geometry geometry)
srsId - SRS idgeometry - geometrypublic static GeoPackageGeometryData createAndBuildEnvelope(long srsId, Geometry geometry)
srsId - SRS idgeometry - geometrypublic static GeoPackageGeometryData createAndWrite(Geometry geometry) throws IOException
getDefaultSrsId()geometry - geometryIOException - upon failure to write bytespublic static GeoPackageGeometryData createBuildEnvelopeAndWrite(Geometry geometry) throws IOException
getDefaultSrsId()geometry - geometryIOException - upon failure to write bytespublic static GeoPackageGeometryData createAndWrite(long srsId, Geometry geometry) throws IOException
srsId - SRS idgeometry - geometryIOException - upon failure to write bytespublic static GeoPackageGeometryData createBuildEnvelopeAndWrite(long srsId, Geometry geometry) throws IOException
srsId - SRS idgeometry - geometryIOException - upon failure to write bytespublic static GeoPackageGeometryData create(byte[] bytes)
bytes - GeoPackage geometry bytespublic static GeoPackageGeometryData create(Geometry geometry, GeometryEnvelope envelope)
getDefaultSrsId()geometry - geometryenvelope - geometry envelopepublic static GeoPackageGeometryData create(long srsId, Geometry geometry, GeometryEnvelope envelope)
srsId - SRS idgeometry - geometryenvelope - geometry envelopepublic static GeoPackageGeometryData create(GeoPackageGeometryData geometryData)
geometryData - geometry datapublic static GeoPackageGeometryData createFromWkb(byte[] bytes) throws IOException
getDefaultSrsId()bytes - well-known bytesIOException - upon failure to read bytespublic static GeoPackageGeometryData createFromWkbAndBuildEnvelope(byte[] bytes) throws IOException
getDefaultSrsId()bytes - well-known bytesIOException - upon failure to read bytespublic static GeoPackageGeometryData createFromWkb(long srsId, byte[] bytes) throws IOException
srsId - SRS idbytes - well-known bytesIOException - upon failure to read bytespublic static GeoPackageGeometryData createFromWkbAndBuildEnvelope(long srsId, byte[] bytes) throws IOException
srsId - SRS idbytes - well-known bytesIOException - upon failure to read bytespublic static GeoPackageGeometryData createFromWkbAndWrite(byte[] bytes) throws IOException
getDefaultSrsId()bytes - well-known bytesIOException - upon failure to read or write bytespublic static GeoPackageGeometryData createFromWkbBuildEnvelopeAndWrite(byte[] bytes) throws IOException
getDefaultSrsId()bytes - well-known bytesIOException - upon failure to read or write bytespublic static GeoPackageGeometryData createFromWkbAndWrite(long srsId, byte[] bytes) throws IOException
srsId - SRS idbytes - well-known bytesIOException - upon failure to read or write bytespublic static GeoPackageGeometryData createFromWkbBuildEnvelopeAndWrite(long srsId, byte[] bytes) throws IOException
srsId - SRS idbytes - well-known bytesIOException - upon failure to read or write bytespublic static Geometry createGeometryFromWkb(byte[] bytes) throws IOException
bytes - well-known bytesIOException - upon failure to read bytespublic static GeoPackageGeometryData createFromWkt(String text) throws IOException
getDefaultSrsId()text - well-known textIOException - upon failure to read textpublic static GeoPackageGeometryData createFromWktAndBuildEnvelope(String text) throws IOException
getDefaultSrsId()text - well-known textIOException - upon failure to read textpublic static GeoPackageGeometryData createFromWkt(long srsId, String text) throws IOException
srsId - SRS idtext - well-known textIOException - upon failure to read textpublic static GeoPackageGeometryData createFromWktAndBuildEnvelope(long srsId, String text) throws IOException
srsId - SRS idtext - well-known textIOException - upon failure to read textpublic static GeoPackageGeometryData createFromWktAndWrite(String text) throws IOException
getDefaultSrsId()text - well-known textIOException - upon failure to read text or write bytespublic static GeoPackageGeometryData createFromWktBuildEnvelopeAndWrite(String text) throws IOException
getDefaultSrsId()text - well-known textIOException - upon failure to read text or write bytespublic static GeoPackageGeometryData createFromWktAndWrite(long srsId, String text) throws IOException
srsId - SRS idtext - well-known textIOException - upon failure to read text or write bytespublic static GeoPackageGeometryData createFromWktBuildEnvelopeAndWrite(long srsId, String text) throws IOException
srsId - SRS idtext - well-known textIOException - upon failure to read text or write bytespublic static Geometry createGeometryFromWkt(String text) throws IOException
text - well-known textIOException - upon failure to read textpublic static byte[] bytes(Geometry geometry) throws IOException
getDefaultSrsId()geometry - geometryIOException - upon failure to write bytespublic static byte[] bytesAndBuildEnvelope(Geometry geometry) throws IOException
getDefaultSrsId()geometry - geometryIOException - upon failure to write bytespublic static byte[] bytes(long srsId,
Geometry geometry)
throws IOException
srsId - SRS idgeometry - geometryIOException - upon failure to write bytespublic static byte[] bytesAndBuildEnvelope(long srsId,
Geometry geometry)
throws IOException
srsId - SRS idgeometry - geometryIOException - upon failure to write bytespublic static byte[] bytesFromWkb(byte[] bytes)
throws IOException
getDefaultSrsId()bytes - well-known bytesIOException - upon failure to read or write bytespublic static byte[] bytesFromWkbAndBuildEnvelope(byte[] bytes)
throws IOException
getDefaultSrsId()bytes - well-known bytesIOException - upon failure to read or write bytespublic static byte[] bytesFromWkb(long srsId,
byte[] bytes)
throws IOException
srsId - SRS idbytes - well-known bytesIOException - upon failure to read or write bytespublic static byte[] bytesFromWkbAndBuildEnvelope(long srsId,
byte[] bytes)
throws IOException
srsId - SRS idbytes - well-known bytesIOException - upon failure to read or write bytespublic static byte[] bytesFromWkt(String text) throws IOException
getDefaultSrsId()text - well-known textIOException - upon failure to read text or write bytespublic static byte[] bytesFromWktAndBuildEnvelope(String text) throws IOException
getDefaultSrsId()text - well-known textIOException - upon failure to read text or write bytespublic static byte[] bytesFromWkt(long srsId,
String text)
throws IOException
srsId - SRS idtext - well-known textIOException - upon failure to read text or write bytespublic static byte[] bytesFromWktAndBuildEnvelope(long srsId,
String text)
throws IOException
srsId - SRS idtext - well-known textIOException - upon failure to read text or write bytespublic static byte[] wkb(GeoPackageGeometryData geometryData) throws IOException
geometryData - geometry dataIOException - upon failure to write bytespublic static byte[] wkb(Geometry geometry) throws IOException
geometry - geometryIOException - upon failure to write bytespublic static byte[] wkb(byte[] bytes)
throws IOException
bytes - GeoPackage geometry bytesIOException - upon failure to read or write bytespublic static byte[] wkbFromWkt(String text) throws IOException
text - well-known textIOException - upon failure to read text or write bytespublic static String wkt(GeoPackageGeometryData geometryData) throws IOException
geometryData - geometry dataIOException - upon failure to write textpublic static String wkt(Geometry geometry) throws IOException
geometry - geometryIOException - upon failure to write textpublic static String wkt(byte[] bytes) throws IOException
bytes - GeoPackage geometry bytesIOException - upon failure to write textpublic static String wktFromWkb(byte[] bytes) throws IOException
bytes - well-known bytesIOException - upon failure to write textpublic void fromBytes(byte[] bytes)
bytes - geometry bytespublic byte[] toBytes()
throws IOException
IOException - upon failure to write bytespublic boolean isExtended()
public boolean isEmpty()
public ByteOrder getByteOrder()
public int getSrsId()
public GeometryEnvelope getEnvelope()
public Geometry getGeometry()
public void setExtended(boolean extended)
extended - extended valuepublic void setEmpty(boolean empty)
empty - empty valuepublic void setByteOrder(ByteOrder byteOrder)
byteOrder - byte orderpublic void setSrsId(int srsId)
srsId - SRS idpublic void setEnvelope(GeometryEnvelope envelope)
envelope - geometry envelopepublic void setGeometry(Geometry geometry)
toBytes() to convert the geometry to bytes.
Alternatively call setGeometryToBytes(Geometry) or
setGeometryAndBuildEnvelopeToBytes(Geometry) to perform both
operations.geometry - geometrypublic byte[] setGeometryToBytes(Geometry geometry) throws IOException
geometry - geometryIOException - upon failure to write bytespublic byte[] setGeometryAndBuildEnvelopeToBytes(Geometry geometry) throws IOException
geometry - geometryIOException - upon failure to write bytespublic void setGeometryFromWkb(byte[] bytes)
throws IOException
bytes - well-known bytesIOException - upon failure to read bytespublic void setGeometryFromWkt(String text) throws IOException
text - well-known textIOException - upon failure to read textpublic byte[] getBytes()
public byte[] getHeaderBytes()
public ByteBuffer getHeaderByteBuffer()
public byte[] getWkb()
public ByteBuffer getWkbBuffer()
public int getWkbGeometryIndex()
public String getWkt()
public GeometryEnvelope getOrBuildEnvelope()
public GeometryEnvelope buildEnvelope()
public static int getIndicator(GeometryEnvelope envelope)
envelope - geometry envelopepublic GeoPackageGeometryData transform(ProjectionTransform transform)
transform - projection transformCopyright © 2021 National Geospatial-Intelligence Agency. All rights reserved.