Package mil.nga.geopackage.db.metadata
Class GeometryMetadataDataSource
java.lang.Object
mil.nga.geopackage.db.metadata.GeometryMetadataDataSource
Table metadata Data Source
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructorGeometryMetadataDataSource
(GeoPackageMetadataDb db, boolean geodesic, Projection projection) Constructor -
Method Summary
Modifier and TypeMethodDescriptionlong
Query for all table geometry metadata countlong
count
(long geoPackageId, String tableName, BoundingBox boundingBox) Query for all table geometry metadata count matching the bounding box in the same projectionlong
count
(long geoPackageId, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata count matching the envelopelong
Query for all table geometry metadata countlong
count
(String geoPackage, String tableName, BoundingBox boundingBox) Query for all table geometry metadata count matching the bounding box in the same projectionlong
count
(String geoPackage, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata count matching the envelopecreate
(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) Create a new geometry metadata from an envelopecreate
(String geoPackage, String tableName, long geomId, GeometryEnvelope envelope) Create a new geometry metadata from an envelopelong
create
(GeometryMetadata metadata) Create a new geometry metadatastatic GeometryMetadata
createGeometryMetadata
(Cursor cursor) Create a geometry metadata from the current cursor locationboolean
createOrUpdate
(GeometryMetadata metadata) Create the geometry metadata or update if it already existsint
delete
(long geoPackageId) Delete geometry metadata by databaseint
Delete geometry metadata by table nameboolean
Delete the geometry metadataint
Delete geometry metadata by databaseint
Delete geometry metadata by table nameboolean
Delete the geometry metadataboolean
delete
(GeometryMetadata metadata) Delete the geometry metadataboolean
exists
(GeometryMetadata metadata) Check if a table metadata existsGet a table metadataGet a table metadataget
(GeometryMetadata metadata) Get a table metadatagetBoundingBox
(long geoPackageId, String tableName) Query for the bounds of the feature table indexgetBoundingBox
(String geoPackage, String tableName) Query for the bounds of the feature table indexlong
getGeoPackageId
(String geoPackage) Get a GeoPackage id from the namestatic long
Get the geometry metadata geometry idGet the feature projectiondouble
Get the query range toleranceboolean
Geometries indexed using geodesic linespopulate
(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) Populate a new geometry metadata from an envelopeQuery for all table geometry metadataquery
(long geoPackageId, String tableName, boolean distinct, String[] columns, GeometryEnvelope envelope, String orderBy, String limit) Query for all table geometry metadata matching the envelopeQuery for all table geometry metadataquery
(long geoPackageId, String tableName, String[] columns, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projectionquery
(long geoPackageId, String tableName, String[] columns, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelopequery
(long geoPackageId, String tableName, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projectionquery
(long geoPackageId, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelopeQuery for all table geometry metadataquery
(String geoPackage, String tableName, boolean distinct, String[] columns, GeometryEnvelope envelope, String orderBy, String limit) Query for all table geometry metadata matching the envelopeQuery for all table geometry metadataquery
(String geoPackage, String tableName, String[] columns, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projectionquery
(String geoPackage, String tableName, String[] columns, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelopequery
(String geoPackage, String tableName, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projectionquery
(String geoPackage, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelopeQuery for all table geometry metadata geometry idsqueryIds
(long geoPackageId, String tableName, BoundingBox boundingBox) Query for all table geometry metadata ids matching the bounding box in the same projectionqueryIds
(long geoPackageId, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata ids matching the envelopeQuery for all table geometry metadata geometry idsqueryIds
(String geoPackage, String tableName, BoundingBox boundingBox) Query for all table geometry metadata ids matching the bounding box in the same projectionqueryIds
(String geoPackage, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata ids matching the envelopequerySQL()
Get the query SQL for a GeoPackage id and table namequerySQL
(GeometryEnvelope envelope) Get the query SQL for an envelope, GeoPackage id, and table nameString[]
querySQLArgs
(long geoPackageId, String tableName) Get the query SQL args for a GeoPackage id and table nameString[]
querySQLArgs
(GeometryEnvelope envelope, long geoPackageId, String tableName) Get the query SQL args for an envelope, GeoPackage id, and table namevoid
setGeodesic
(boolean geodesic) Set the geodestic flag, true to index geodesic geometriesvoid
setProjection
(Projection projection) Set the feature projectionvoid
setTolerance
(double tolerance) Set the query range toleranceboolean
update
(GeometryMetadata metadata) Update the geometry metadata
-
Field Details
-
tolerance
protected double toleranceQuery range tolerance
-
-
Constructor Details
-
GeometryMetadataDataSource
Constructor- Parameters:
db
- metadata db
-
GeometryMetadataDataSource
Constructor- Parameters:
db
- metadata dbgeodesic
- index geodesic geometries flagprojection
- feature projection- Since:
- 6.7.4
-
-
Method Details
-
getTolerance
public double getTolerance()Get the query range tolerance- Returns:
- query range tolerance
-
setTolerance
public void setTolerance(double tolerance) Set the query range tolerance- Parameters:
tolerance
- query range tolerance
-
isGeodesic
public boolean isGeodesic()Geometries indexed using geodesic lines- Returns:
- geodesic flag
- Since:
- 6.7.4
-
setGeodesic
public void setGeodesic(boolean geodesic) Set the geodestic flag, true to index geodesic geometries- Parameters:
geodesic
- index geodesic geometries flag- Since:
- 6.7.4
-
getProjection
Get the feature projection- Returns:
- projection
- Since:
- 6.7.4
-
setProjection
Set the feature projection- Parameters:
projection
- projection- Since:
- 6.7.4
-
create
Create a new geometry metadata- Parameters:
metadata
- geometry metadata- Returns:
- id
-
create
public GeometryMetadata create(String geoPackage, String tableName, long geomId, GeometryEnvelope envelope) Create a new geometry metadata from an envelope- Parameters:
geoPackage
- GeoPackage nametableName
- table namegeomId
- geometry idenvelope
- geometry envelope- Returns:
- geometry metadata
-
create
public GeometryMetadata create(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) Create a new geometry metadata from an envelope- Parameters:
geoPackageId
- GeoPackage idtableName
- table namegeomId
- geometry idenvelope
- geometry envelope- Returns:
- geometry metadata
-
populate
public GeometryMetadata populate(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) Populate a new geometry metadata from an envelope- Parameters:
geoPackageId
- GeoPackage idtableName
- table namegeomId
- geometry idenvelope
- geometry envelope- Returns:
- geometry metadata
-
delete
Delete the geometry metadata- Parameters:
metadata
- geometry metadata- Returns:
- deleted count
-
delete
Delete geometry metadata by database- Parameters:
geoPackage
- GeoPackage name- Returns:
- deleted count
-
delete
public int delete(long geoPackageId) Delete geometry metadata by database- Parameters:
geoPackageId
- GeoPackage id- Returns:
- deleted count
-
delete
Delete geometry metadata by table name- Parameters:
geoPackage
- GeoPackage nametableName
- table name- Returns:
- deleted count
-
delete
Delete geometry metadata by table name- Parameters:
geoPackageId
- GeoPackage idtableName
- table name- Returns:
- deleted count
-
delete
Delete the geometry metadata- Parameters:
geoPackage
- GeoPackage nametableName
- table nameid
- id- Returns:
- deleted flag
-
delete
Delete the geometry metadata- Parameters:
geoPackageId
- GeoPackage idtableName
- table nameid
- id- Returns:
- deleted flag
-
createOrUpdate
Create the geometry metadata or update if it already exists- Parameters:
metadata
- geometry metadata- Returns:
- created flag
-
update
Update the geometry metadata- Parameters:
metadata
- geometry metadata- Returns:
- updated flag
-
exists
Check if a table metadata exists- Parameters:
metadata
- geometry metadata- Returns:
- exists flag
-
get
Get a table metadata- Parameters:
metadata
- geometry metadata- Returns:
- geometry metadata
-
get
Get a table metadata- Parameters:
geoPackage
- GeoPackage nametableName
- table nameid
- id- Returns:
- geometry metadata
-
get
Get a table metadata- Parameters:
geoPackageId
- GeoPackage idtableName
- table nameid
- id- Returns:
- geometry metadata
-
query
Query for all table geometry metadata- Parameters:
geoPackage
- GeoPackage nametableName
- table name- Returns:
- cursor that must be closed
-
queryIds
Query for all table geometry metadata geometry ids- Parameters:
geoPackage
- GeoPackage nametableName
- table name- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
query
Query for all table geometry metadata- Parameters:
geoPackage
- GeoPackage nametableName
- table namecolumns
- queried columns- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
count
Query for all table geometry metadata count- Parameters:
geoPackage
- GeoPackage nametableName
- table name- Returns:
- count
- Since:
- 3.4.0
-
getBoundingBox
Query for the bounds of the feature table index- Parameters:
geoPackage
- GeoPackage nametableName
- table name- Returns:
- bounding box
- Since:
- 3.1.0
-
getBoundingBox
Query for the bounds of the feature table index- Parameters:
geoPackageId
- GeoPackage idtableName
- table name- Returns:
- bounding box
- Since:
- 3.1.0
-
query
Query for all table geometry metadata- Parameters:
geoPackageId
- GeoPackage idtableName
- table name- Returns:
- cursor that must be closed
-
queryIds
Query for all table geometry metadata geometry ids- Parameters:
geoPackageId
- GeoPackage idtableName
- table name- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
query
Query for all table geometry metadata- Parameters:
geoPackageId
- GeoPackage idtableName
- table namecolumns
- queried columns- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
count
Query for all table geometry metadata count- Parameters:
geoPackageId
- GeoPackage idtableName
- table name- Returns:
- count
- Since:
- 3.4.0
-
querySQL
Get the query SQL for a GeoPackage id and table name- Returns:
- SQL
- Since:
- 3.4.0
-
querySQLArgs
Get the query SQL args for a GeoPackage id and table name- Parameters:
geoPackageId
- GeoPackage idtableName
- table name- Returns:
- SQL args
- Since:
- 3.4.0
-
query
Query for all table geometry metadata matching the bounding box in the same projection- Parameters:
geoPackage
- GeoPackage nametableName
- table nameboundingBox
- bounding box- Returns:
- cursor that must be closed
-
queryIds
Query for all table geometry metadata ids matching the bounding box in the same projection- Parameters:
geoPackage
- GeoPackage nametableName
- table nameboundingBox
- bounding box- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
query
Query for all table geometry metadata matching the bounding box in the same projection- Parameters:
geoPackage
- GeoPackage nametableName
- table namecolumns
- queried columnsboundingBox
- bounding box- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
count
Query for all table geometry metadata count matching the bounding box in the same projection- Parameters:
geoPackage
- GeoPackage nametableName
- table nameboundingBox
- bounding box- Returns:
- count
- Since:
- 3.4.0
-
query
Query for all table geometry metadata matching the bounding box in the same projection- Parameters:
geoPackageId
- GeoPackage idtableName
- table nameboundingBox
- bounding box- Returns:
- cursor that must be closed
-
queryIds
Query for all table geometry metadata ids matching the bounding box in the same projection- Parameters:
geoPackageId
- GeoPackage idtableName
- table nameboundingBox
- bounding box- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
query
Query for all table geometry metadata matching the bounding box in the same projection- Parameters:
geoPackageId
- GeoPackage idtableName
- table namecolumns
- queried columnsboundingBox
- bounding box- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
count
Query for all table geometry metadata count matching the bounding box in the same projection- Parameters:
geoPackageId
- GeoPackage idtableName
- table nameboundingBox
- bounding box- Returns:
- count
- Since:
- 3.4.0
-
query
Query for all table geometry metadata matching the envelope- Parameters:
geoPackage
- GeoPackage nametableName
- table nameenvelope
- geometry envelope- Returns:
- cursor that must be closed
-
queryIds
Query for all table geometry metadata ids matching the envelope- Parameters:
geoPackage
- GeoPackage nametableName
- table nameenvelope
- geometry envelope- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
query
public Cursor query(String geoPackage, String tableName, String[] columns, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelope- Parameters:
geoPackage
- GeoPackage nametableName
- table namecolumns
- queried columnsenvelope
- geometry envelope- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
count
Query for all table geometry metadata count matching the envelope- Parameters:
geoPackage
- GeoPackage nametableName
- table nameenvelope
- geometry envelope- Returns:
- count
- Since:
- 3.4.0
-
query
public Cursor query(String geoPackage, String tableName, boolean distinct, String[] columns, GeometryEnvelope envelope, String orderBy, String limit) Query for all table geometry metadata matching the envelope- Parameters:
geoPackage
- GeoPackage nametableName
- table namedistinct
- distinct flagcolumns
- queried columnsenvelope
- geometry envelopeorderBy
- order bylimit
- limit- Returns:
- cursor that must be closed
- Since:
- 6.2.1
-
query
Query for all table geometry metadata matching the envelope- Parameters:
geoPackageId
- GeoPackage idtableName
- table nameenvelope
- geometry envelope- Returns:
- cursor that must be closed
-
queryIds
Query for all table geometry metadata ids matching the envelope- Parameters:
geoPackageId
- GeoPackage idtableName
- table nameenvelope
- geometry envelope- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
query
public Cursor query(long geoPackageId, String tableName, String[] columns, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelope- Parameters:
geoPackageId
- GeoPackage idtableName
- table namecolumns
- queried columnsenvelope
- geometry envelope- Returns:
- cursor that must be closed
- Since:
- 3.4.0
-
count
Query for all table geometry metadata count matching the envelope- Parameters:
geoPackageId
- GeoPackage idtableName
- table nameenvelope
- geometry envelope- Returns:
- count
- Since:
- 3.4.0
-
query
public Cursor query(long geoPackageId, String tableName, boolean distinct, String[] columns, GeometryEnvelope envelope, String orderBy, String limit) Query for all table geometry metadata matching the envelope- Parameters:
geoPackageId
- GeoPackage idtableName
- table namedistinct
- distinct flagcolumns
- queried columnsenvelope
- geometry envelopeorderBy
- order bylimit
- limit- Returns:
- cursor that must be closed
- Since:
- 6.2.1
-
querySQL
Get the query SQL for an envelope, GeoPackage id, and table name- Parameters:
envelope
- geometry envelope- Returns:
- SQL
- Since:
- 3.4.0
-
querySQLArgs
Get the query SQL args for an envelope, GeoPackage id, and table name- Parameters:
envelope
- geometry envelopegeoPackageId
- GeoPackage idtableName
- table name- Returns:
- SQL args
- Since:
- 3.4.0
-
getGeoPackageId
Get a GeoPackage id from the name- Parameters:
geoPackage
- GeoPackage name- Returns:
- id
-
createGeometryMetadata
Create a geometry metadata from the current cursor location- Parameters:
cursor
- cursor- Returns:
- geometry metadata
-
getId
Get the geometry metadata geometry id- Parameters:
cursor
- cursor- Returns:
- id
- Since:
- 3.4.0
-