Class FeatureTileGenerator

java.lang.Object
mil.nga.geopackage.tiles.TileGenerator
mil.nga.geopackage.tiles.features.FeatureTileGenerator

public class FeatureTileGenerator extends TileGenerator
Creates a set of tiles within a GeoPackage by generating tiles from features
  • Constructor Details

    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, int zoomLevel, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      zoomLevel - zoom level
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, int minZoom, int maxZoom, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      minZoom - min zoom
      maxZoom - max zoom
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      1.3.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, Collection<Integer> zoomLevels, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      zoomLevels - zoom levels
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, int[] zoomLevels, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      zoomLevels - zoom levels
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, int zoomLevel, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      zoomLevel - zoom level
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, int minZoom, int maxZoom, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      minZoom - min zoom
      maxZoom - max zoom
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      3.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, Collection<Integer> zoomLevels, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      zoomLevels - zoom levels
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, int[] zoomLevels, BoundingBox boundingBox, Projection projection)
      Constructor
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      zoomLevels - zoom levels
      boundingBox - tiles bounding box
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, int zoomLevel, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      zoomLevel - zoom level
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, int minZoom, int maxZoom, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      minZoom - min zoom
      maxZoom - max zoom
      projection - tiles projection
      Since:
      3.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, Collection<Integer> zoomLevels, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      zoomLevels - zoom levels
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, int[] zoomLevels, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      zoomLevels - zoom levels
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, int zoomLevel, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      zoomLevel - zoom level
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, int minZoom, int maxZoom, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      minZoom - min zoom
      maxZoom - max zoom
      projection - tiles projection
      Since:
      3.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, Collection<Integer> zoomLevels, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      zoomLevels - zoom levels
      projection - tiles projection
      Since:
      6.2.0
    • FeatureTileGenerator

      public FeatureTileGenerator(Context context, GeoPackage geoPackage, String tableName, FeatureTiles featureTiles, GeoPackage featureGeoPackage, int[] zoomLevels, Projection projection)
      Constructor, find the the bounding box from the feature table
      Parameters:
      context - app context
      geoPackage - GeoPackage
      tableName - table name
      featureTiles - feature tiles
      featureGeoPackage - feature GeoPackage if different from the destination
      zoomLevels - zoom levels
      projection - tiles projection
      Since:
      6.2.0
  • Method Details

    • getBoundingBox

      public BoundingBox getBoundingBox(int zoom)
      Get the bounding box, possibly expanded for the zoom level
      Overrides:
      getBoundingBox in class TileGenerator
      Parameters:
      zoom - zoom level
      Returns:
      original or expanded bounding box
    • close

      public void close()
      Close the GeoPackage
      Overrides:
      close in class TileGenerator
    • isLinkTables

      public boolean isLinkTables()
      Is the feature table going to be linked with the tile table? Defaults to true.
      Returns:
      true if tables will be linked upon generation
      Since:
      1.2.5
    • setLinkTables

      public void setLinkTables(boolean linkTables)
      Set the link tables flag
      Parameters:
      linkTables - link tables flag
      Since:
      1.2.5
    • preTileGeneration

      protected void preTileGeneration()
      Called after set up and right before tile generation starts for the first zoom level
      Specified by:
      preTileGeneration in class TileGenerator
    • createTile

      protected byte[] createTile(int z, long x, long y)
      Create the tile
      Specified by:
      createTile in class TileGenerator
      Parameters:
      z - zoom level
      x - x coordinate
      y - y coordinate
      Returns:
      tile bytes