Package mil.nga.geopackage.map.geom
Class FeatureShapes
java.lang.Object
mil.nga.geopackage.map.geom.FeatureShapes
Maintains a collection of feature map shapes by database, table name, and feature id
- Since:
- 2.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapMetadataShape
(GoogleMapShape mapShape, long featureId, String database, String table) Add a map metadata shape with the feature id, database, and tablevoid
addMapShape
(GoogleMapShape mapShape, long featureId, String database, String table) Add a map shape with the feature id, database, and tablevoid
clear()
Clearboolean
Check if map shapes exist for the feature id, database, and tableGet the mapping between databases and tablesint
Get the databases countgetFeatureIds
(String database, String table) Get the mapping between feature ids and map shapes for the database and tableint
getFeatureIdsCount
(String database, String table) Get the feature ids count for the database and tablegetFeatureShape
(String database, String table, long featureId) Get the feature shape for the database, table, and feature idint
getFeatureShapeCount
(String database, String table, long featureId) Get the feature shape count for the database, table, and feature idGet the mapping between tables and feature ids for the databaseint
getTablesCount
(String database) Get the tables count for the databaseboolean
removeFeatureShape
(String database, String table, long featureId) Remove the feature shape from the database and tableint
Remove all map shapes from the mapint
removeShapes
(String database) Remove all map shapes in the database from the mapint
removeShapes
(String database, String table) Remove all map shapes in the database and table from the mapint
removeShapesExcluding
(String database, String table, GoogleMapShapeType... excludedTypes) Remove all map shapes in the database and table from the map, excluding shapes with the excluded typesint
removeShapesExcluding
(String database, GoogleMapShapeType... excludedTypes) Remove all map shapes in the database from the map, excluding shapes with the excluded typesint
removeShapesExcluding
(GoogleMapShapeType... excludedTypes) Remove all map shapes from the map, excluding shapes with the excluded typesint
Remove all map shapes that are not visible in the mapint
removeShapesNotWithinMap
(GoogleMap map, String database) Remove all map shapes int the database that are not visible in the mapint
removeShapesNotWithinMap
(GoogleMap map, String database, String table) Remove all map shapes in the database and table that are not visible in the mapint
removeShapesNotWithinMap
(BoundingBox boundingBox, String database) Remove all map shapes in the database that are not visible in the bounding boxint
removeShapesNotWithinMap
(BoundingBox boundingBox, String database, String table) Remove all map shapes in the database and table that are not visible in the bounding boxint
removeShapesWithExclusion
(String database, String table, GoogleMapShapeType excludedType) Remove all map shapes in the database and table from the map, excluding shapes with the excluded typeint
removeShapesWithExclusion
(String database, GoogleMapShapeType excludedType) Remove all map shapes in the database from the map, excluding shapes with the excluded typeint
removeShapesWithExclusion
(GoogleMapShapeType excludedType) Remove all map shapes from the map, excluding shapes with the excluded typeint
removeShapesWithExclusions
(String database, String table, Set<GoogleMapShapeType> excludedTypes) Remove all map shapes in the database and table from the map, excluding shapes with the excluded typesint
removeShapesWithExclusions
(String database, Set<GoogleMapShapeType> excludedTypes) Remove all map shapes in the database from the map, excluding shapes with the excluded typesint
removeShapesWithExclusions
(Set<GoogleMapShapeType> excludedTypes) Remove all map shapes from the map, excluding shapes with the excluded types
-
Constructor Details
-
FeatureShapes
public FeatureShapes()Constructor
-
-
Method Details
-
getDatabases
Get the mapping between databases and tables- Returns:
- databases to tables mapping
- Since:
- 3.2.0
-
getDatabasesCount
public int getDatabasesCount()Get the databases count- Returns:
- databases count
-
getTables
Get the mapping between tables and feature ids for the database- Parameters:
database
- GeoPackage database- Returns:
- tables to features ids mapping
- Since:
- 3.2.0
-
getTablesCount
Get the tables count for the database- Parameters:
database
- GeoPackage database- Returns:
- tables count
-
getFeatureIds
Get the mapping between feature ids and map shapes for the database and table- Parameters:
database
- GeoPackage databasetable
- table name- Returns:
- feature ids to map shapes mapping
- Since:
- 3.2.0
-
getFeatureIdsCount
Get the feature ids count for the database and table- Parameters:
database
- GeoPackage databasetable
- table name- Returns:
- feature ids count
-
getFeatureShape
Get the feature shape for the database, table, and feature id- Parameters:
database
- GeoPackage databasetable
- table namefeatureId
- feature id- Returns:
- feature shape
- Since:
- 3.2.0
-
getFeatureShapeCount
Get the feature shape count for the database, table, and feature id- Parameters:
database
- GeoPackage databasetable
- table namefeatureId
- feature id- Returns:
- map shapes count
- Since:
- 3.2.0
-
addMapShape
Add a map shape with the feature id, database, and table- Parameters:
mapShape
- map shapefeatureId
- feature iddatabase
- GeoPackage databasetable
- table name
-
addMapMetadataShape
public void addMapMetadataShape(GoogleMapShape mapShape, long featureId, String database, String table) Add a map metadata shape with the feature id, database, and table- Parameters:
mapShape
- map metadata shapefeatureId
- feature iddatabase
- GeoPackage databasetable
- table name- Since:
- 3.2.0
-
exists
Check if map shapes exist for the feature id, database, and table- Parameters:
featureId
- feature iddatabase
- GeoPackage databasetable
- table name- Returns:
- true if exists
-
removeShapes
public int removeShapes()Remove all map shapes from the map- Returns:
- count of removed features
-
removeShapesWithExclusion
Remove all map shapes from the map, excluding shapes with the excluded type- Parameters:
excludedType
- Google Map Shape Type to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapesExcluding
Remove all map shapes from the map, excluding shapes with the excluded types- Parameters:
excludedTypes
- Google Map Shape Types to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapesWithExclusions
Remove all map shapes from the map, excluding shapes with the excluded types- Parameters:
excludedTypes
- Google Map Shape Types to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapes
Remove all map shapes in the database from the map- Parameters:
database
- GeoPackage database- Returns:
- count of removed features
-
removeShapesWithExclusion
Remove all map shapes in the database from the map, excluding shapes with the excluded type- Parameters:
database
- GeoPackage databaseexcludedType
- Google Map Shape Type to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapesExcluding
Remove all map shapes in the database from the map, excluding shapes with the excluded types- Parameters:
database
- GeoPackage databaseexcludedTypes
- Google Map Shape Types to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapesWithExclusions
Remove all map shapes in the database from the map, excluding shapes with the excluded types- Parameters:
database
- GeoPackage databaseexcludedTypes
- Google Map Shape Types to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapes
Remove all map shapes in the database and table from the map- Parameters:
database
- GeoPackage databasetable
- table name- Returns:
- count of removed features
-
removeShapesWithExclusion
public int removeShapesWithExclusion(String database, String table, GoogleMapShapeType excludedType) Remove all map shapes in the database and table from the map, excluding shapes with the excluded type- Parameters:
database
- GeoPackage databasetable
- table nameexcludedType
- Google Map Shape Type to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapesExcluding
public int removeShapesExcluding(String database, String table, GoogleMapShapeType... excludedTypes) Remove all map shapes in the database and table from the map, excluding shapes with the excluded types- Parameters:
database
- GeoPackage databasetable
- table nameexcludedTypes
- Google Map Shape Types to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapesWithExclusions
public int removeShapesWithExclusions(String database, String table, Set<GoogleMapShapeType> excludedTypes) Remove all map shapes in the database and table from the map, excluding shapes with the excluded types- Parameters:
database
- GeoPackage databasetable
- table nameexcludedTypes
- Google Map Shape Types to exclude from map removal- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapesNotWithinMap
Remove all map shapes that are not visible in the map- Parameters:
map
- map- Returns:
- count of removed features
-
removeShapesNotWithinMap
Remove all map shapes int the database that are not visible in the map- Parameters:
map
- mapdatabase
- GeoPackage database- Returns:
- count of removed features
-
removeShapesNotWithinMap
Remove all map shapes in the database that are not visible in the bounding box- Parameters:
boundingBox
- bounding boxdatabase
- GeoPackage database- Returns:
- count of removed features
- Since:
- 3.2.0
-
removeShapesNotWithinMap
Remove all map shapes in the database and table that are not visible in the map- Parameters:
map
- mapdatabase
- GeoPackage databasetable
- table name- Returns:
- count of removed features
-
removeShapesNotWithinMap
Remove all map shapes in the database and table that are not visible in the bounding box- Parameters:
boundingBox
- bounding boxdatabase
- GeoPackage databasetable
- table name- Returns:
- count of removed features
-
removeFeatureShape
Remove the feature shape from the database and table- Parameters:
database
- GeoPackage databasetable
- table namefeatureId
- feature id- Returns:
- true if removed
- Since:
- 3.2.0
-
clear
public void clear()Clear
-