Class DefaultFeatureTiles
java.lang.Object
mil.nga.geopackage.tiles.features.FeatureTiles
mil.nga.geopackage.tiles.features.DefaultFeatureTiles
Default Feature Tiles implementation using Android Graphics to draw tiles
from Well Known Binary Geometries
- Since:
- 1.3.1
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
When true, geometries are cached.static final int
Default max number of feature geometries to retain in cacheprotected final LruCache<Long,
GeoPackageGeometryData> Geometry cacheFields inherited from class mil.nga.geopackage.tiles.features.FeatureTiles
compressFormat, context, density, featureDao, featureTableStyles, fillPolygon, geodesic, heightOverlap, indexManager, linePaint, lineStrokeWidth, maxFeaturesPerTile, maxFeaturesTileDraw, pointIcon, pointPaint, pointRadius, polygonFillPaint, polygonPaint, polygonStrokeWidth, projection, simplifyGeometries, tileHeight, tileWidth, WEB_MERCATOR_PROJECTION, WGS_84_PROJECTION, widthOverlap
-
Constructor Summary
ConstructorDescriptionDefaultFeatureTiles
(Context context) Constructor, only for retrieving default feature attributesDefaultFeatureTiles
(Context context, FeatureDao featureDao) ConstructorDefaultFeatureTiles
(Context context, FeatureDao featureDao, boolean geodesic) ConstructorDefaultFeatureTiles
(Context context, FeatureDao featureDao, float density) ConstructorDefaultFeatureTiles
(Context context, FeatureDao featureDao, float density, boolean geodesic) ConstructorDefaultFeatureTiles
(Context context, FeatureDao featureDao, int width, int height) ConstructorDefaultFeatureTiles
(Context context, FeatureDao featureDao, int width, int height, boolean geodesic) ConstructorDefaultFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, int width, int height) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, int width, int height, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao, int width, int height) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesDefaultFeatureTiles
(Context context, 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
Modifier and TypeMethodDescriptionvoid
Clear all cachesvoid
Clear the geometry cachedrawTile
(int zoom, BoundingBox boundingBox, List<FeatureRow> featureRow) Draw a tile bitmap from the feature rowsdrawTile
(int zoom, BoundingBox boundingBox, FeatureIndexResults results) Draw a tile bitmap from feature index resultsdrawTile
(int zoom, BoundingBox boundingBox, FeatureCursor cursor) Draw a tile bitmap from feature geometries in the provided cursorboolean
Is caching geometries enabled?void
setCacheGeometries
(boolean cacheGeometries) Set the cache geometries flagvoid
setGeometryCacheSize
(int size) Set / resize the geometry cache sizeMethods inherited from class mil.nga.geopackage.tiles.features.FeatureTiles
calculateDrawOverlap, calculateStylePixelBounds, calculateStylePixelBounds, checkIfDrawn, clearIconCache, clearStylePaintCache, close, createNewBitmap, drawTile, drawTileBytes, drawTileQueryAll, drawTileQueryIndex, expandBoundingBox, expandBoundingBox, expandBoundingBox, geodesicPath, getCompressFormat, getDensity, getFeatureDao, getFeatureStyle, getFeatureStyle, getFeatureTableStyles, getHeightDrawOverlap, getIcon, getIndexManager, getLineAlpha, getLineColor, getLinePaint, getLinePaintCopy, getLineStrokeWidth, getMaxFeaturesPerTile, getMaxFeaturesTileDraw, getPointIcon, getPointPaint, getPointPaint, getPointRadius, getPolygonAlpha, getPolygonColor, getPolygonFillAlpha, getPolygonFillColor, getPolygonFillPaint, getPolygonFillPaintCopy, getPolygonPaint, getPolygonPaintCopy, getPolygonStrokeWidth, getProjectionToWebMercatorTransform, getTileHeight, getTileWidth, getWgs84ToWebMercatorTransform, getWidthDrawOverlap, ignoreFeatureTableStyles, isFillPolygon, isGeodesic, isIndexQuery, isSimplifyGeometries, isTransparent, queryIndexedFeatures, queryIndexedFeatures, queryIndexedFeaturesCount, queryIndexedFeaturesCount, setCompressFormat, setDensity, setDrawOverlap, setFeatureTableStyles, setFillPolygon, setGeodesic, setHeightDrawOverlap, setIconCacheSize, setIndexManager, setLineAlpha, setLineColor, setLinePaint, setLineStrokeWidth, setMaxFeaturesPerTile, setMaxFeaturesTileDraw, setPointIcon, setPointPaint, setPointRadius, setPolygonAlpha, setPolygonColor, setPolygonFillAlpha, setPolygonFillColor, setPolygonFillPaint, setPolygonPaint, setPolygonStrokeWidth, setSimplifyGeometries, setStylePaintCacheSize, setTileHeight, setTileWidth, setWidthDrawOverlap, simplifyPoints
-
Field Details
-
DEFAULT_GEOMETRY_CACHE_SIZE
public static final int DEFAULT_GEOMETRY_CACHE_SIZEDefault max number of feature geometries to retain in cache- Since:
- 3.3.0
- See Also:
-
geometryCache
Geometry cache -
cacheGeometries
protected boolean cacheGeometriesWhen true, geometries are cached. Default is true
-
-
Constructor Details
-
DefaultFeatureTiles
Constructor- Parameters:
context
- contextfeatureDao
- feature dao
-
DefaultFeatureTiles
Constructor- Parameters:
context
- contextfeatureDao
- feature daogeodesic
- draw geometries using geodesic lines- Since:
- 6.7.4
-
DefaultFeatureTiles
Constructor- Parameters:
context
- contextfeatureDao
- feature daodensity
- display density:DisplayMetrics.density
- Since:
- 3.2.0
-
DefaultFeatureTiles
Constructor- Parameters:
context
- contextfeatureDao
- feature daodensity
- display density:DisplayMetrics.density
geodesic
- draw geometries using geodesic lines- Since:
- 6.7.4
-
DefaultFeatureTiles
Constructor- Parameters:
context
- contextfeatureDao
- feature daowidth
- drawn tile widthheight
- drawn tile height- Since:
- 3.2.0
-
DefaultFeatureTiles
public DefaultFeatureTiles(Context context, FeatureDao featureDao, int width, int height, boolean geodesic) Constructor- Parameters:
context
- contextfeatureDao
- feature daowidth
- drawn tile widthheight
- drawn tile heightgeodesic
- draw geometries using geodesic lines- Since:
- 6.7.4
-
DefaultFeatureTiles
Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context
- contextgeoPackage
- GeoPackagefeatureDao
- feature dao- Since:
- 3.2.0
-
DefaultFeatureTiles
public DefaultFeatureTiles(Context context, GeoPackage geoPackage, FeatureDao featureDao, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context
- contextgeoPackage
- GeoPackagefeatureDao
- feature daogeodesic
- draw geometries using geodesic lines- Since:
- 6.7.4
-
DefaultFeatureTiles
public DefaultFeatureTiles(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context
- contextgeoPackage
- GeoPackagefeatureDao
- feature daodensity
- display density:DisplayMetrics.density
- Since:
- 3.2.0
-
DefaultFeatureTiles
public DefaultFeatureTiles(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context
- contextgeoPackage
- GeoPackagefeatureDao
- feature daodensity
- display density:DisplayMetrics.density
geodesic
- draw geometries using geodesic lines- Since:
- 6.7.4
-
DefaultFeatureTiles
public DefaultFeatureTiles(Context context, GeoPackage geoPackage, FeatureDao featureDao, int width, int height) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context
- contextgeoPackage
- GeoPackagefeatureDao
- feature daowidth
- drawn tile widthheight
- drawn tile height- Since:
- 3.2.0
-
DefaultFeatureTiles
public DefaultFeatureTiles(Context context, 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:
context
- contextgeoPackage
- GeoPackagefeatureDao
- feature daowidth
- drawn tile widthheight
- drawn tile heightgeodesic
- draw geometries using geodesic lines- Since:
- 6.7.4
-
DefaultFeatureTiles
public DefaultFeatureTiles(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, int width, int height) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context
- contextgeoPackage
- GeoPackagefeatureDao
- feature daodensity
- display density:DisplayMetrics.density
width
- drawn tile widthheight
- drawn tile height- Since:
- 3.2.0
-
DefaultFeatureTiles
public DefaultFeatureTiles(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, int width, int height, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context
- contextgeoPackage
- GeoPackagefeatureDao
- feature daodensity
- display density:DisplayMetrics.density
width
- drawn tile widthheight
- drawn tile heightgeodesic
- draw geometries using geodesic lines- Since:
- 6.7.4
-
DefaultFeatureTiles
Constructor, only for retrieving default feature attributes- Parameters:
context
- context
-
-
Method Details
-
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
Draw a tile bitmap from feature index results- Specified by:
drawTile
in classFeatureTiles
- Parameters:
zoom
- zoom levelboundingBox
- web mercator bounding boxresults
- feature index results- Returns:
- tile
-
drawTile
Draw a tile bitmap from feature geometries in the provided cursor- Specified by:
drawTile
in classFeatureTiles
- Parameters:
zoom
- zoom levelboundingBox
- web mercator bounding boxcursor
- feature cursor- Returns:
- tile
-
drawTile
Draw a tile bitmap from the feature rows- Specified by:
drawTile
in classFeatureTiles
- Parameters:
zoom
- zoom levelboundingBox
- web mercator bounding boxfeatureRow
- feature row- Returns:
- tile
-