Class DefaultFeatureTiles


  • public class DefaultFeatureTiles
    extends FeatureTiles
    Default Feature Tiles implementation using Java AWT to draw
    Since:
    1.1.2
    Author:
    osbornb
    • Field Detail

      • DEFAULT_GEOMETRY_CACHE_SIZE

        public static final int DEFAULT_GEOMETRY_CACHE_SIZE
        Default max number of feature geometries to retain in cache
        Since:
        3.3.0
        See Also:
        Constant Field Values
      • geometryCacheSize

        protected int geometryCacheSize
        Max geometry cache size
      • cacheGeometries

        protected boolean cacheGeometries
        When true, geometries are cached. Default is true
    • Constructor Detail

      • DefaultFeatureTiles

        public DefaultFeatureTiles​(FeatureDao featureDao)
        Constructor
        Parameters:
        featureDao - feature dao
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(FeatureDao featureDao,
                                   boolean geodesic)
        Constructor
        Parameters:
        featureDao - feature dao
        geodesic - draw geometries using geodesic lines
        Since:
        6.6.5
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(FeatureDao featureDao,
                                   float scale)
        Constructor
        Parameters:
        featureDao - feature dao
        scale - scale factor
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(FeatureDao featureDao,
                                   float scale,
                                   boolean geodesic)
        Constructor
        Parameters:
        featureDao - feature dao
        scale - scale factor
        geodesic - draw geometries using geodesic lines
        Since:
        6.6.5
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(FeatureDao featureDao,
                                   int width,
                                   int height)
        Constructor
        Parameters:
        featureDao - feature dao
        width - drawn tile width
        height - drawn tile height
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(FeatureDao featureDao,
                                   int width,
                                   int height,
                                   boolean geodesic)
        Constructor
        Parameters:
        featureDao - feature dao
        width - drawn tile width
        height - drawn tile height
        geodesic - draw geometries using geodesic lines
        Since:
        6.6.5
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(GeoPackage geoPackage,
                                   FeatureDao featureDao)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        geoPackage - GeoPackage
        featureDao - feature dao
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   boolean geodesic)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        geoPackage - GeoPackage
        featureDao - feature dao
        geodesic - draw geometries using geodesic lines
        Since:
        6.6.5
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   float scale)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        geoPackage - GeoPackage
        featureDao - feature dao
        scale - scale factor
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   float scale,
                                   boolean geodesic)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        geoPackage - GeoPackage
        featureDao - feature dao
        scale - scale factor
        geodesic - draw geometries using geodesic lines
        Since:
        6.6.5
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   int width,
                                   int height)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        geoPackage - GeoPackage
        featureDao - feature dao
        width - drawn tile width
        height - drawn tile height
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   int width,
                                   int height,
                                   boolean geodesic)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        geoPackage - GeoPackage
        featureDao - feature dao
        width - drawn tile width
        height - drawn tile height
        geodesic - draw geometries using geodesic lines
        Since:
        6.6.5
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   float scale,
                                   int width,
                                   int height)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        geoPackage - GeoPackage
        featureDao - feature dao
        scale - scale factor
        width - drawn tile width
        height - drawn tile height
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   float scale,
                                   int width,
                                   int height,
                                   boolean geodesic)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        geoPackage - GeoPackage
        featureDao - feature dao
        scale - scale factor
        width - drawn tile width
        height - drawn tile height
        geodesic - draw geometries using geodesic lines
        Since:
        6.6.5
    • Method Detail

      • isCacheGeometries

        public boolean isCacheGeometries()
        Is caching geometries enabled?
        Returns:
        true if caching geometries
        Since:
        3.3.0
      • setCacheGeometries

        public void setCacheGeometries​(boolean cacheGeometries)
        Set the cache geometries flag
        Parameters:
        cacheGeometries - true to cache geometries
        Since:
        3.3.0
      • clearGeometryCache

        public void clearGeometryCache()
        Clear the geometry cache
        Since:
        3.3.0
      • setGeometryCacheSize

        public void setGeometryCacheSize​(int size)
        Set / resize the geometry cache size
        Parameters:
        size - new size
        Since:
        3.3.0
      • drawTile

        public BufferedImage drawTile​(int zoom,
                                      BoundingBox boundingBox,
                                      FeatureIndexResults results)
        Draw a tile image from geometry index results
        Specified by:
        drawTile in class FeatureTiles
        Parameters:
        zoom - zoom level
        boundingBox - web mercator bounding box
        results - feature index results
        Returns:
        image
      • drawTile

        public BufferedImage drawTile​(int zoom,
                                      BoundingBox boundingBox,
                                      FeatureResultSet resultSet)
        Draw a tile image from feature geometries in the provided result set
        Specified by:
        drawTile in class FeatureTiles
        Parameters:
        zoom - zoom level
        boundingBox - web mercator bounding box
        resultSet - feature result set
        Returns:
        image
      • drawTile

        public BufferedImage drawTile​(int zoom,
                                      BoundingBox boundingBox,
                                      List<FeatureRow> featureRow)
        Draw a tile image from the feature rows
        Specified by:
        drawTile in class FeatureTiles
        Parameters:
        zoom - zoom level
        boundingBox - web mercator bounding box
        featureRow - feature row
        Returns:
        image