Package mil.nga.geopackage.map.geom
Class FeatureShapes
- java.lang.Object
-
- mil.nga.geopackage.map.geom.FeatureShapes
-
public class FeatureShapes extends Object
Maintains a collection of feature map shapes by database, table name, and feature id- Since:
- 2.0.0
-
-
Constructor Summary
Constructors Constructor Description FeatureShapes()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMapMetadataShape(GoogleMapShape mapShape, long featureId, String database, String table)Add a map metadata shape with the feature id, database, and tablevoidaddMapShape(GoogleMapShape mapShape, long featureId, String database, String table)Add a map shape with the feature id, database, and tablevoidclear()Clearbooleanexists(long featureId, String database, String table)Check if map shapes exist for the feature id, database, and tableMap<String,Map<String,Map<Long,FeatureShape>>>getDatabases()Get the mapping between databases and tablesintgetDatabasesCount()Get the databases countMap<Long,FeatureShape>getFeatureIds(String database, String table)Get the mapping between feature ids and map shapes for the database and tableintgetFeatureIdsCount(String database, String table)Get the feature ids count for the database and tableFeatureShapegetFeatureShape(String database, String table, long featureId)Get the feature shape for the database, table, and feature idintgetFeatureShapeCount(String database, String table, long featureId)Get the feature shape count for the database, table, and feature idMap<String,Map<Long,FeatureShape>>getTables(String database)Get the mapping between tables and feature ids for the databaseintgetTablesCount(String database)Get the tables count for the databasebooleanremoveFeatureShape(String database, String table, long featureId)Remove the feature shape from the database and tableintremoveShapes()Remove all map shapes from the mapintremoveShapes(String database)Remove all map shapes in the database from the mapintremoveShapes(String database, String table)Remove all map shapes in the database and table from the mapintremoveShapesExcluding(String database, String table, GoogleMapShapeType... excludedTypes)Remove all map shapes in the database and table from the map, excluding shapes with the excluded typesintremoveShapesExcluding(String database, GoogleMapShapeType... excludedTypes)Remove all map shapes in the database from the map, excluding shapes with the excluded typesintremoveShapesExcluding(GoogleMapShapeType... excludedTypes)Remove all map shapes from the map, excluding shapes with the excluded typesintremoveShapesNotWithinMap(GoogleMap map)Remove all map shapes that are not visible in the mapintremoveShapesNotWithinMap(GoogleMap map, String database)Remove all map shapes int the database that are not visible in the mapintremoveShapesNotWithinMap(GoogleMap map, String database, String table)Remove all map shapes in the database and table that are not visible in the mapintremoveShapesNotWithinMap(BoundingBox boundingBox, String database)Remove all map shapes in the database that are not visible in the bounding boxintremoveShapesNotWithinMap(BoundingBox boundingBox, String database, String table)Remove all map shapes in the database and table that are not visible in the bounding boxintremoveShapesWithExclusion(String database, String table, GoogleMapShapeType excludedType)Remove all map shapes in the database and table from the map, excluding shapes with the excluded typeintremoveShapesWithExclusion(String database, GoogleMapShapeType excludedType)Remove all map shapes in the database from the map, excluding shapes with the excluded typeintremoveShapesWithExclusion(GoogleMapShapeType excludedType)Remove all map shapes from the map, excluding shapes with the excluded typeintremoveShapesWithExclusions(String database, String table, Set<GoogleMapShapeType> excludedTypes)Remove all map shapes in the database and table from the map, excluding shapes with the excluded typesintremoveShapesWithExclusions(String database, Set<GoogleMapShapeType> excludedTypes)Remove all map shapes in the database from the map, excluding shapes with the excluded typesintremoveShapesWithExclusions(Set<GoogleMapShapeType> excludedTypes)Remove all map shapes from the map, excluding shapes with the excluded types
-
-
-
Method Detail
-
getDatabases
public Map<String,Map<String,Map<Long,FeatureShape>>> 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
public Map<String,Map<Long,FeatureShape>> getTables(String database)
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
public int getTablesCount(String database)
Get the tables count for the database- Parameters:
database- GeoPackage database- Returns:
- tables count
-
getFeatureIds
public Map<Long,FeatureShape> getFeatureIds(String database, String table)
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
public int getFeatureIdsCount(String database, String table)
Get the feature ids count for the database and table- Parameters:
database- GeoPackage databasetable- table name- Returns:
- feature ids count
-
getFeatureShape
public FeatureShape getFeatureShape(String database, String table, long featureId)
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
public int getFeatureShapeCount(String database, String table, long featureId)
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
public void addMapShape(GoogleMapShape mapShape, long featureId, String database, String table)
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
public boolean exists(long featureId, String database, String table)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
public int removeShapesWithExclusion(GoogleMapShapeType excludedType)
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
public int removeShapesExcluding(GoogleMapShapeType... excludedTypes)
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
public int removeShapesWithExclusions(Set<GoogleMapShapeType> excludedTypes)
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
public int removeShapes(String database)
Remove all map shapes in the database from the map- Parameters:
database- GeoPackage database- Returns:
- count of removed features
-
removeShapesWithExclusion
public int removeShapesWithExclusion(String database, GoogleMapShapeType excludedType)
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
public int removeShapesExcluding(String database, GoogleMapShapeType... excludedTypes)
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
public int removeShapesWithExclusions(String database, Set<GoogleMapShapeType> excludedTypes)
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
public int removeShapes(String database, String table)
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
public int removeShapesNotWithinMap(GoogleMap map)
Remove all map shapes that are not visible in the map- Parameters:
map- map- Returns:
- count of removed features
-
removeShapesNotWithinMap
public int removeShapesNotWithinMap(GoogleMap map, String database)
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
public int removeShapesNotWithinMap(BoundingBox boundingBox, String database)
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
public int removeShapesNotWithinMap(GoogleMap map, String database, String table)
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
public int removeShapesNotWithinMap(BoundingBox boundingBox, String database, String table)
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
public boolean removeFeatureShape(String database, String table, long featureId)
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
-
-