Package mil.nga.geopackage.db.metadata
Class GeometryMetadataDataSource
java.lang.Object
mil.nga.geopackage.db.metadata.GeometryMetadataDataSource
Table metadata Data Source
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionConstructorGeometryMetadataDataSource(GeoPackageMetadataDb db, boolean geodesic, Projection projection) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionlongQuery for all table geometry metadata countlongcount(long geoPackageId, String tableName, BoundingBox boundingBox) Query for all table geometry metadata count matching the bounding box in the same projectionlongcount(long geoPackageId, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata count matching the envelopelongQuery for all table geometry metadata countlongcount(String geoPackage, String tableName, BoundingBox boundingBox) Query for all table geometry metadata count matching the bounding box in the same projectionlongcount(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 envelopelongcreate(GeometryMetadata metadata) Create a new geometry metadatastatic GeometryMetadatacreateGeometryMetadata(android.database.Cursor cursor) Create a geometry metadata from the current cursor locationbooleancreateOrUpdate(GeometryMetadata metadata) Create the geometry metadata or update if it already existsintdelete(long geoPackageId) Delete geometry metadata by databaseintDelete geometry metadata by table namebooleanDelete the geometry metadataintDelete geometry metadata by databaseintDelete geometry metadata by table namebooleanDelete the geometry metadatabooleandelete(GeometryMetadata metadata) Delete the geometry metadatabooleanexists(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 indexlonggetGeoPackageId(String geoPackage) Get a GeoPackage id from the namestatic longgetId(android.database.Cursor cursor) Get the geometry metadata geometry idGet the feature projectiondoubleGet the query range tolerancebooleanGeometries indexed using geodesic linespopulate(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) Populate a new geometry metadata from an envelopeandroid.database.CursorQuery for all table geometry metadataandroid.database.Cursorquery(long geoPackageId, String tableName, boolean distinct, String[] columns, GeometryEnvelope envelope, String orderBy, String limit) Query for all table geometry metadata matching the envelopeandroid.database.CursorQuery for all table geometry metadataandroid.database.Cursorquery(long geoPackageId, String tableName, String[] columns, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projectionandroid.database.Cursorquery(long geoPackageId, String tableName, String[] columns, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelopeandroid.database.Cursorquery(long geoPackageId, String tableName, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projectionandroid.database.Cursorquery(long geoPackageId, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelopeandroid.database.CursorQuery for all table geometry metadataandroid.database.Cursorquery(String geoPackage, String tableName, boolean distinct, String[] columns, GeometryEnvelope envelope, String orderBy, String limit) Query for all table geometry metadata matching the envelopeandroid.database.CursorQuery for all table geometry metadataandroid.database.Cursorquery(String geoPackage, String tableName, String[] columns, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projectionandroid.database.Cursorquery(String geoPackage, String tableName, String[] columns, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelopeandroid.database.Cursorquery(String geoPackage, String tableName, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projectionandroid.database.Cursorquery(String geoPackage, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelopeandroid.database.CursorQuery for all table geometry metadata geometry idsandroid.database.CursorqueryIds(long geoPackageId, String tableName, BoundingBox boundingBox) Query for all table geometry metadata ids matching the bounding box in the same projectionandroid.database.CursorqueryIds(long geoPackageId, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata ids matching the envelopeandroid.database.CursorQuery for all table geometry metadata geometry idsandroid.database.CursorqueryIds(String geoPackage, String tableName, BoundingBox boundingBox) Query for all table geometry metadata ids matching the bounding box in the same projectionandroid.database.CursorqueryIds(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 namevoidsetGeodesic(boolean geodesic) Set the geodestic flag, true to index geodesic geometriesvoidsetProjection(Projection projection) Set the feature projectionvoidsetTolerance(double tolerance) Set the query range tolerancebooleanupdate(GeometryMetadata metadata) Update the geometry metadata
- 
Field Details- 
toleranceprotected double toleranceQuery range tolerance
 
- 
- 
Constructor Details- 
GeometryMetadataDataSourceConstructor- Parameters:
- db- metadata db
 
- 
GeometryMetadataDataSourceConstructor- Parameters:
- db- metadata db
- geodesic- index geodesic geometries flag
- projection- feature projection
- Since:
- 6.7.4
 
 
- 
- 
Method Details- 
getTolerancepublic double getTolerance()Get the query range tolerance- Returns:
- query range tolerance
 
- 
setTolerancepublic void setTolerance(double tolerance) Set the query range tolerance- Parameters:
- tolerance- query range tolerance
 
- 
isGeodesicpublic boolean isGeodesic()Geometries indexed using geodesic lines- Returns:
- geodesic flag
- Since:
- 6.7.4
 
- 
setGeodesicpublic void setGeodesic(boolean geodesic) Set the geodestic flag, true to index geodesic geometries- Parameters:
- geodesic- index geodesic geometries flag
- Since:
- 6.7.4
 
- 
getProjectionGet the feature projection- Returns:
- projection
- Since:
- 6.7.4
 
- 
setProjectionSet the feature projection- Parameters:
- projection- projection
- Since:
- 6.7.4
 
- 
createCreate a new geometry metadata- Parameters:
- metadata- geometry metadata
- Returns:
- id
 
- 
createpublic GeometryMetadata create(String geoPackage, String tableName, long geomId, GeometryEnvelope envelope) Create a new geometry metadata from an envelope- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- geomId- geometry id
- envelope- geometry envelope
- Returns:
- geometry metadata
 
- 
createpublic GeometryMetadata create(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) Create a new geometry metadata from an envelope- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- geomId- geometry id
- envelope- geometry envelope
- Returns:
- geometry metadata
 
- 
populatepublic GeometryMetadata populate(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) Populate a new geometry metadata from an envelope- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- geomId- geometry id
- envelope- geometry envelope
- Returns:
- geometry metadata
 
- 
deleteDelete the geometry metadata- Parameters:
- metadata- geometry metadata
- Returns:
- deleted count
 
- 
deleteDelete geometry metadata by database- Parameters:
- geoPackage- GeoPackage name
- Returns:
- deleted count
 
- 
deletepublic int delete(long geoPackageId) Delete geometry metadata by database- Parameters:
- geoPackageId- GeoPackage id
- Returns:
- deleted count
 
- 
deleteDelete geometry metadata by table name- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- Returns:
- deleted count
 
- 
deleteDelete geometry metadata by table name- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- Returns:
- deleted count
 
- 
deleteDelete the geometry metadata- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- id- id
- Returns:
- deleted flag
 
- 
deleteDelete the geometry metadata- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- id- id
- Returns:
- deleted flag
 
- 
createOrUpdateCreate the geometry metadata or update if it already exists- Parameters:
- metadata- geometry metadata
- Returns:
- created flag
 
- 
updateUpdate the geometry metadata- Parameters:
- metadata- geometry metadata
- Returns:
- updated flag
 
- 
existsCheck if a table metadata exists- Parameters:
- metadata- geometry metadata
- Returns:
- exists flag
 
- 
getGet a table metadata- Parameters:
- metadata- geometry metadata
- Returns:
- geometry metadata
 
- 
getGet a table metadata- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- id- id
- Returns:
- geometry metadata
 
- 
getGet a table metadata- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- id- id
- Returns:
- geometry metadata
 
- 
queryQuery for all table geometry metadata- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- Returns:
- cursor that must be closed
 
- 
queryIdsQuery for all table geometry metadata geometry ids- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
queryQuery for all table geometry metadata- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- columns- queried columns
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
countQuery for all table geometry metadata count- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- Returns:
- count
- Since:
- 3.4.0
 
- 
getBoundingBoxQuery for the bounds of the feature table index- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- Returns:
- bounding box
- Since:
- 3.1.0
 
- 
getBoundingBoxQuery for the bounds of the feature table index- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- Returns:
- bounding box
- Since:
- 3.1.0
 
- 
queryQuery for all table geometry metadata- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- Returns:
- cursor that must be closed
 
- 
queryIdsQuery for all table geometry metadata geometry ids- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
queryQuery for all table geometry metadata- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- columns- queried columns
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
countQuery for all table geometry metadata count- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- Returns:
- count
- Since:
- 3.4.0
 
- 
querySQLGet the query SQL for a GeoPackage id and table name- Returns:
- SQL
- Since:
- 3.4.0
 
- 
querySQLArgsGet the query SQL args for a GeoPackage id and table name- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- Returns:
- SQL args
- Since:
- 3.4.0
 
- 
queryQuery for all table geometry metadata matching the bounding box in the same projection- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- boundingBox- bounding box
- Returns:
- cursor that must be closed
 
- 
queryIdspublic android.database.Cursor queryIds(String geoPackage, String tableName, BoundingBox boundingBox) Query for all table geometry metadata ids matching the bounding box in the same projection- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- boundingBox- bounding box
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
querypublic android.database.Cursor query(String geoPackage, String tableName, String[] columns, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projection- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- columns- queried columns
- boundingBox- bounding box
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
countQuery for all table geometry metadata count matching the bounding box in the same projection- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- boundingBox- bounding box
- Returns:
- count
- Since:
- 3.4.0
 
- 
queryQuery for all table geometry metadata matching the bounding box in the same projection- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- boundingBox- bounding box
- Returns:
- cursor that must be closed
 
- 
queryIdspublic android.database.Cursor queryIds(long geoPackageId, String tableName, BoundingBox boundingBox) Query for all table geometry metadata ids matching the bounding box in the same projection- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- boundingBox- bounding box
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
querypublic android.database.Cursor query(long geoPackageId, String tableName, String[] columns, BoundingBox boundingBox) Query for all table geometry metadata matching the bounding box in the same projection- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- columns- queried columns
- boundingBox- bounding box
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
countQuery for all table geometry metadata count matching the bounding box in the same projection- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- boundingBox- bounding box
- Returns:
- count
- Since:
- 3.4.0
 
- 
querypublic android.database.Cursor query(String geoPackage, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelope- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- envelope- geometry envelope
- Returns:
- cursor that must be closed
 
- 
queryIdspublic android.database.Cursor queryIds(String geoPackage, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata ids matching the envelope- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- envelope- geometry envelope
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
querypublic android.database.Cursor query(String geoPackage, String tableName, String[] columns, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelope- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- columns- queried columns
- envelope- geometry envelope
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
countQuery for all table geometry metadata count matching the envelope- Parameters:
- geoPackage- GeoPackage name
- tableName- table name
- envelope- geometry envelope
- Returns:
- count
- Since:
- 3.4.0
 
- 
querypublic android.database.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 name
- tableName- table name
- distinct- distinct flag
- columns- queried columns
- envelope- geometry envelope
- orderBy- order by
- limit- limit
- Returns:
- cursor that must be closed
- Since:
- 6.2.1
 
- 
querypublic android.database.Cursor query(long geoPackageId, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelope- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- envelope- geometry envelope
- Returns:
- cursor that must be closed
 
- 
queryIdspublic android.database.Cursor queryIds(long geoPackageId, String tableName, GeometryEnvelope envelope) Query for all table geometry metadata ids matching the envelope- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- envelope- geometry envelope
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
querypublic android.database.Cursor query(long geoPackageId, String tableName, String[] columns, GeometryEnvelope envelope) Query for all table geometry metadata matching the envelope- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- columns- queried columns
- envelope- geometry envelope
- Returns:
- cursor that must be closed
- Since:
- 3.4.0
 
- 
countQuery for all table geometry metadata count matching the envelope- Parameters:
- geoPackageId- GeoPackage id
- tableName- table name
- envelope- geometry envelope
- Returns:
- count
- Since:
- 3.4.0
 
- 
querypublic android.database.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 id
- tableName- table name
- distinct- distinct flag
- columns- queried columns
- envelope- geometry envelope
- orderBy- order by
- limit- limit
- Returns:
- cursor that must be closed
- Since:
- 6.2.1
 
- 
querySQLGet the query SQL for an envelope, GeoPackage id, and table name- Parameters:
- envelope- geometry envelope
- Returns:
- SQL
- Since:
- 3.4.0
 
- 
querySQLArgsGet the query SQL args for an envelope, GeoPackage id, and table name- Parameters:
- envelope- geometry envelope
- geoPackageId- GeoPackage id
- tableName- table name
- Returns:
- SQL args
- Since:
- 3.4.0
 
- 
getGeoPackageIdGet a GeoPackage id from the name- Parameters:
- geoPackage- GeoPackage name
- Returns:
- id
 
- 
createGeometryMetadataCreate a geometry metadata from the current cursor location- Parameters:
- cursor- cursor
- Returns:
- geometry metadata
 
- 
getIdpublic static long getId(android.database.Cursor cursor) Get the geometry metadata geometry id- Parameters:
- cursor- cursor
- Returns:
- id
- Since:
- 3.4.0
 
 
-