Class FeatureTileGenerator


  • public class FeatureTileGenerator
    extends TileGenerator
    Creates a set of tiles within a GeoPackage by generating tiles from features
    Since:
    1.1.2
    Author:
    osbornb
    • Constructor Detail

      • FeatureTileGenerator

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

        public FeatureTileGenerator​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    int zoomLevel,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    int minZoom,
                                    int maxZoom,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        geoPackage - GeoPackage
        tableName - table name
        featureTiles - feature tiles
        minZoom - min zoom
        maxZoom - max zoom
        boundingBox - tiles bounding box
        projection - tiles projection
        Since:
        1.2.0
      • FeatureTileGenerator

        public FeatureTileGenerator​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    Collection<Integer> zoomLevels,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    int[] zoomLevels,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    int zoomLevel,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    int minZoom,
                                    int maxZoom,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    Collection<Integer> zoomLevels,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    int[] zoomLevels,
                                    BoundingBox boundingBox,
                                    Projection projection)
        Constructor
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    Projection projection)
        Constructor, find the the bounding box from the feature table
        Parameters:
        geoPackage - GeoPackage
        tableName - table name
        featureTiles - feature tiles
        projection - tiles projection
        Since:
        6.2.0
      • FeatureTileGenerator

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

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

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

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

        public FeatureTileGenerator​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    Projection projection)
        Constructor, find the the bounding box from the feature table
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    int zoomLevel,
                                    Projection projection)
        Constructor, find the the bounding box from the feature table
        Parameters:
        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​(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:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    Collection<Integer> zoomLevels,
                                    Projection projection)
        Constructor, find the the bounding box from the feature table
        Parameters:
        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​(GeoPackage geoPackage,
                                    String tableName,
                                    FeatureTiles featureTiles,
                                    GeoPackage featureGeoPackage,
                                    int[] zoomLevels,
                                    Projection projection)
        Constructor, find the the bounding box from the feature table
        Parameters:
        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 Detail

      • 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
      • 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.1.6
      • setLinkTables

        public void setLinkTables​(boolean linkTables)
        Set the link tables flag
        Parameters:
        linkTables - link tables flag
        Since:
        1.1.6
      • 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