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 Details

    • FeatureShapes

      public FeatureShapes()
      Constructor
  • Method Details

    • 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 database
      table - 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 database
      table - 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 database
      table - table name
      featureId - 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 database
      table - table name
      featureId - 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 shape
      featureId - feature id
      database - GeoPackage database
      table - 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 shape
      featureId - feature id
      database - GeoPackage database
      table - 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 id
      database - GeoPackage database
      table - 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 database
      excludedType - 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 database
      excludedTypes - 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 database
      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, String table)
      Remove all map shapes in the database and table from the map
      Parameters:
      database - GeoPackage database
      table - 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 database
      table - table name
      excludedType - 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 database
      table - table name
      excludedTypes - 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 database
      table - table name
      excludedTypes - 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 - map
      database - 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 box
      database - 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 - map
      database - GeoPackage database
      table - 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 box
      database - GeoPackage database
      table - 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 database
      table - table name
      featureId - feature id
      Returns:
      true if removed
      Since:
      3.2.0
    • clear

      public void clear()
      Clear