Class DefaultFeatureTiles
- java.lang.Object
-
- mil.nga.geopackage.tiles.features.FeatureTiles
-
- mil.nga.geopackage.tiles.features.DefaultFeatureTiles
-
public class DefaultFeatureTiles extends FeatureTiles
Default Feature Tiles implementation using Java AWT to draw- Since:
- 1.1.2
- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
cacheGeometries
When true, geometries are cached.static int
DEFAULT_GEOMETRY_CACHE_SIZE
Default max number of feature geometries to retain in cacheprotected Map<Long,GeoPackageGeometryData>
geometryCache
Geometry cacheprotected int
geometryCacheSize
Max geometry cache size-
Fields inherited from class mil.nga.geopackage.tiles.features.FeatureTiles
compressFormat, featureDao, featureTableStyles, fillPolygon, geodesic, heightOverlap, indexManager, linePaint, lineStrokeWidth, maxFeaturesPerTile, maxFeaturesTileDraw, pointIcon, pointPaint, pointRadius, polygonFillPaint, polygonPaint, polygonStrokeWidth, projection, scale, simplifyGeometries, tileHeight, tileWidth, WEB_MERCATOR_PROJECTION, widthOverlap
-
-
Constructor Summary
Constructors Constructor Description DefaultFeatureTiles(FeatureDao featureDao)
ConstructorDefaultFeatureTiles(FeatureDao featureDao, boolean geodesic)
ConstructorDefaultFeatureTiles(FeatureDao featureDao, float scale)
ConstructorDefaultFeatureTiles(FeatureDao featureDao, float scale, boolean geodesic)
ConstructorDefaultFeatureTiles(FeatureDao featureDao, int width, int height)
ConstructorDefaultFeatureTiles(FeatureDao featureDao, int width, int height, boolean geodesic)
ConstructorDefaultFeatureTiles(GeoPackage geoPackage, FeatureDao featureDao)
Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles(GeoPackage geoPackage, FeatureDao featureDao, boolean geodesic)
Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles(GeoPackage geoPackage, FeatureDao featureDao, float scale)
Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles(GeoPackage geoPackage, FeatureDao featureDao, float scale, boolean geodesic)
Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles(GeoPackage geoPackage, FeatureDao featureDao, float scale, int width, int height)
Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles(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 tablesDefaultFeatureTiles(GeoPackage geoPackage, FeatureDao featureDao, int width, int height)
Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles(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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clear all cachesvoid
clearGeometryCache()
Clear the geometry cacheBufferedImage
drawTile(int zoom, BoundingBox boundingBox, List<FeatureRow> featureRow)
Draw a tile image from the feature rowsBufferedImage
drawTile(int zoom, BoundingBox boundingBox, FeatureIndexResults results)
Draw a tile image from geometry index resultsBufferedImage
drawTile(int zoom, BoundingBox boundingBox, FeatureResultSet resultSet)
Draw a tile image from feature geometries in the provided result setboolean
isCacheGeometries()
Is caching geometries enabled?void
setCacheGeometries(boolean cacheGeometries)
Set the cache geometries flagvoid
setGeometryCacheSize(int size)
Set / resize the geometry cache size-
Methods inherited from class mil.nga.geopackage.tiles.features.FeatureTiles
calculateDrawOverlap, calculateStylePixelBounds, calculateStylePixelBounds, checkIfDrawn, clearIconCache, clearStylePaintCache, close, createNewImage, drawTile, drawTileBytes, drawTileQueryAll, drawTileQueryIndex, expandBoundingBox, expandBoundingBox, expandBoundingBox, geodesicPath, getCompressFormat, getFeatureDao, getFeatureStyle, getFeatureStyle, getFeatureTableStyles, getGraphics, getHeightDrawOverlap, getIcon, getIndexManager, getLineColor, getLinePaint, getLineStrokeWidth, getMaxFeaturesPerTile, getMaxFeaturesTileDraw, getPointColor, getPointIcon, getPointPaint, getPointRadius, getPolygonColor, getPolygonFillColor, getPolygonFillPaint, getPolygonPaint, getPolygonStrokeWidth, getScale, getTileHeight, getTileWidth, getWebMercatorTransform, getWidthDrawOverlap, ignoreFeatureTableStyles, isFillPolygon, isGeodesic, isIndexQuery, isSimplifyGeometries, isTransparent, queryIndexedFeatures, queryIndexedFeatures, queryIndexedFeaturesCount, queryIndexedFeaturesCount, setCompressFormat, setDrawOverlap, setFeatureTableStyles, setFillPolygon, setGeodesic, setHeightDrawOverlap, setIconCacheSize, setIndexManager, setLineColor, setLineStrokeWidth, setMaxFeaturesPerTile, setMaxFeaturesTileDraw, setPointColor, setPointIcon, setPointRadius, setPolygonColor, setPolygonFillColor, setPolygonStrokeWidth, setScale, setSimplifyGeometries, setStylePaintCacheSize, setTileHeight, setTileWidth, setWidthDrawOverlap, simplifyPoints
-
-
-
-
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
-
geometryCache
protected final Map<Long,GeoPackageGeometryData> geometryCache
Geometry cache
-
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 daogeodesic
- draw geometries using geodesic lines- Since:
- 6.6.5
-
DefaultFeatureTiles
public DefaultFeatureTiles(FeatureDao featureDao, float scale)
Constructor- Parameters:
featureDao
- feature daoscale
- scale factor- Since:
- 3.2.0
-
DefaultFeatureTiles
public DefaultFeatureTiles(FeatureDao featureDao, float scale, boolean geodesic)
Constructor- Parameters:
featureDao
- feature daoscale
- scale factorgeodesic
- draw geometries using geodesic lines- Since:
- 6.6.5
-
DefaultFeatureTiles
public DefaultFeatureTiles(FeatureDao featureDao, int width, int height)
Constructor- Parameters:
featureDao
- feature daowidth
- drawn tile widthheight
- drawn tile height- Since:
- 3.2.0
-
DefaultFeatureTiles
public DefaultFeatureTiles(FeatureDao featureDao, int width, int height, boolean geodesic)
Constructor- Parameters:
featureDao
- feature daowidth
- drawn tile widthheight
- drawn tile heightgeodesic
- 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
- GeoPackagefeatureDao
- 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
- GeoPackagefeatureDao
- feature daogeodesic
- 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
- GeoPackagefeatureDao
- feature daoscale
- 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
- GeoPackagefeatureDao
- feature daoscale
- scale factorgeodesic
- 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
- GeoPackagefeatureDao
- feature daowidth
- drawn tile widthheight
- 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
- GeoPackagefeatureDao
- feature daowidth
- drawn tile widthheight
- drawn tile heightgeodesic
- 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
- GeoPackagefeatureDao
- feature daoscale
- scale factorwidth
- drawn tile widthheight
- 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
- GeoPackagefeatureDao
- feature daoscale
- scale factorwidth
- drawn tile widthheight
- drawn tile heightgeodesic
- 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
-
clearCache
public void clearCache()
Clear all caches- Overrides:
clearCache
in classFeatureTiles
-
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 classFeatureTiles
- Parameters:
zoom
- zoom levelboundingBox
- web mercator bounding boxresults
- 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 classFeatureTiles
- Parameters:
zoom
- zoom levelboundingBox
- web mercator bounding boxresultSet
- 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 classFeatureTiles
- Parameters:
zoom
- zoom levelboundingBox
- web mercator bounding boxfeatureRow
- feature row- Returns:
- image
-
-