Class FeatureOverlayQuery
- java.lang.Object
-
- mil.nga.geopackage.map.tiles.overlay.FeatureOverlayQuery
-
public class FeatureOverlayQuery extends Object
Used to query the features represented by tiles, either being drawn from or linked to the features- Since:
- 1.1.0
-
-
Constructor Summary
Constructors Constructor Description FeatureOverlayQuery(Context context, BoundedOverlay boundedOverlay, FeatureTiles featureTiles)ConstructorFeatureOverlayQuery(Context context, FeatureOverlay featureOverlay)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbuildMapClickMessage(LatLng latLng, View view, GoogleMap map)Perform a query based upon the map click location and build a info messageStringbuildMapClickMessage(LatLng latLng, View view, GoogleMap map, Projection projection)Perform a query based upon the map click location and build a info messageStringbuildMapClickMessageWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds)Perform a query based upon the map click location and build a info messageStringbuildMapClickMessageWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance)Perform a query based upon the map click location and build a info messageStringbuildMapClickMessageWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance, Projection projection)Perform a query based upon the map click location and build a info messageStringbuildMapClickMessageWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, Projection projection)Perform a query based upon the map click location and build a info messageFeatureTableDatabuildMapClickTableData(LatLng latLng, View view, GoogleMap map)Perform a query based upon the map click location and build feature table dataFeatureTableDatabuildMapClickTableData(LatLng latLng, View view, GoogleMap map, Projection projection)Perform a query based upon the map click location and build feature table dataFeatureTableDatabuildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds)Perform a query based upon the map click location and build feature table dataFeatureTableDatabuildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance)Perform a query based upon the map click location and build feature table dataFeatureTableDatabuildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance, Projection projection)Perform a query based upon the map click location and build feature table dataFeatureTableDatabuildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, Projection projection)Perform a query based upon the map click location and build feature table dataStringbuildMaxFeaturesInfoMessage(long tileFeaturesCount)Get a max features information messagevoidcalculateStylePixelBounds()Calculate and set the style pixel bounds to enable queries on visible feature stylesvoidclose()Close the feature overlay query connectionBoundedOverlaygetBoundedOverlay()Get the bounded overlayFeatureInfoBuildergetFeatureInfoBuilder()Get the feature info builderFeatureTilesgetFeatureTiles()Get the feature tilesfloatgetScreenClickPercentage()Get the screen click percentage, between 0.0 and 1.0PixelBoundsgetStylePixelBounds()Get the style pixel boundsbooleanisIndexed()Check if the features are indexedbooleanisMoreThanMaxFeatures(long tileFeaturesCount)Determine if the provided count of features in the tile is more than the configured max features per tilebooleanisOnAtCurrentZoom(double zoom, LatLng latLng)Determine if the feature overlay is on for the provided zoom level at the locationbooleanisOnAtCurrentZoom(GoogleMap map, LatLng latLng)Determine if the the feature overlay is on for the current zoom level of the map at the locationFeatureIndexResultsqueryFeatures(String[] columns, BoundingBox boundingBox)Query for features in the WGS84 projected bounding boxFeatureIndexResultsqueryFeatures(String[] columns, BoundingBox boundingBox, Projection projection)Query for features in the bounding boxFeatureIndexResultsqueryFeatures(BoundingBox boundingBox)Query for features in the WGS84 projected bounding boxFeatureIndexResultsqueryFeatures(BoundingBox boundingBox, Projection projection)Query for features in the bounding boxvoidsetScreenClickPercentage(float screenClickPercentage)Set the screen click percentage, between 0.0 and 1.0voidsetStylePixelBounds(PixelBounds pixelBounds)Set the style pixel bounds to enable queries on visible feature stylesstatic BoundingBoxtileBounds(LatLng latLng, double zoom)Get the WGS84 bounds of the tile at the lat lng coordinate and zoom levelstatic BoundingBoxtileBounds(LatLng latLng, int zoom)Get the WGS84 bounds of the tile at the lat lng coordinate and zoom levelstatic BoundingBoxtileBounds(Projection projection, LatLng latLng, double zoom)Get the bounds of the tile at the lat lng coordinate and zoom levelstatic BoundingBoxtileBounds(Projection projection, LatLng latLng, int zoom)Get the bounds of the tile at the lat lng coordinate and zoom levelstatic BoundingBoxtileBounds(Projection projection, Point point, double zoom)Get the bounds of the tile at the point coordinate and zoom levelstatic BoundingBoxtileBounds(Projection projection, Point point, int zoom)Get the bounds of the tile at the point coordinate and zoom levelstatic BoundingBoxtileBounds(Point point, double zoom)Get the WGS84 bounds of the tile at the point coordinate and zoom levelstatic BoundingBoxtileBounds(Point point, int zoom)Get the WGS84 bounds of the tile at the point coordinate and zoom levellongtileFeatureCount(LatLng latLng, double zoom)Get the count of features in the tile at the lat lng coordinate and zoom levellongtileFeatureCount(LatLng latLng, int zoom)Get the count of features in the tile at the lat lng coordinate and zoom levellongtileFeatureCount(Point point, double zoom)Get the count of features in the tile at the point coordinate and zoom levellongtileFeatureCount(Point point, int zoom)Get the count of features in the tile at the point coordinate and zoom level
-
-
-
Constructor Detail
-
FeatureOverlayQuery
public FeatureOverlayQuery(Context context, FeatureOverlay featureOverlay)
Constructor- Parameters:
context- contextfeatureOverlay- feature overlay
-
FeatureOverlayQuery
public FeatureOverlayQuery(Context context, BoundedOverlay boundedOverlay, FeatureTiles featureTiles)
Constructor- Parameters:
context- contextboundedOverlay- bounded overlayfeatureTiles- feature tiles- Since:
- 1.2.5
-
-
Method Detail
-
close
public void close()
Close the feature overlay query connection- Since:
- 1.2.7
-
getBoundedOverlay
public BoundedOverlay getBoundedOverlay()
Get the bounded overlay- Returns:
- bounded overlay
- Since:
- 1.2.5
-
getFeatureTiles
public FeatureTiles getFeatureTiles()
Get the feature tiles- Returns:
- feature tiles
-
getFeatureInfoBuilder
public FeatureInfoBuilder getFeatureInfoBuilder()
Get the feature info builder- Returns:
- feature info builder
-
getScreenClickPercentage
public float getScreenClickPercentage()
Get the screen click percentage, between 0.0 and 1.0- Returns:
- screen click percentage
-
setScreenClickPercentage
public void setScreenClickPercentage(float screenClickPercentage)
Set the screen click percentage, between 0.0 and 1.0- Parameters:
screenClickPercentage- screen click percentage
-
calculateStylePixelBounds
public void calculateStylePixelBounds()
Calculate and set the style pixel bounds to enable queries on visible feature styles- Since:
- 6.3.0
-
getStylePixelBounds
public PixelBounds getStylePixelBounds()
Get the style pixel bounds- Returns:
- style pixel bounds
- Since:
- 6.3.0
-
setStylePixelBounds
public void setStylePixelBounds(PixelBounds pixelBounds)
Set the style pixel bounds to enable queries on visible feature styles- Parameters:
pixelBounds- style pixel bounds- Since:
- 6.3.0
-
isOnAtCurrentZoom
public boolean isOnAtCurrentZoom(GoogleMap map, LatLng latLng)
Determine if the the feature overlay is on for the current zoom level of the map at the location- Parameters:
map- google maplatLng- lat lon location- Returns:
- true if on
- Since:
- 1.2.6
-
isOnAtCurrentZoom
public boolean isOnAtCurrentZoom(double zoom, LatLng latLng)Determine if the feature overlay is on for the provided zoom level at the location- Parameters:
zoom- zoom levellatLng- lat lon location- Returns:
- true if on
- Since:
- 1.2.6
-
tileFeatureCount
public long tileFeatureCount(LatLng latLng, double zoom)
Get the count of features in the tile at the lat lng coordinate and zoom level- Parameters:
latLng- lat lng locationzoom- zoom level- Returns:
- count
-
tileFeatureCount
public long tileFeatureCount(LatLng latLng, int zoom)
Get the count of features in the tile at the lat lng coordinate and zoom level- Parameters:
latLng- lat lng locationzoom- zoom level- Returns:
- count
-
tileFeatureCount
public long tileFeatureCount(Point point, double zoom)
Get the count of features in the tile at the point coordinate and zoom level- Parameters:
point- point locationzoom- zoom level- Returns:
- count
-
tileFeatureCount
public long tileFeatureCount(Point point, int zoom)
Get the count of features in the tile at the point coordinate and zoom level- Parameters:
point- point locationzoom- zoom level- Returns:
- count
-
tileBounds
public static BoundingBox tileBounds(LatLng latLng, double zoom)
Get the WGS84 bounds of the tile at the lat lng coordinate and zoom level- Parameters:
latLng- lat lng locationzoom- zoom level- Returns:
- WGS84 bounding box
- Since:
- 6.2.0
-
tileBounds
public static BoundingBox tileBounds(LatLng latLng, int zoom)
Get the WGS84 bounds of the tile at the lat lng coordinate and zoom level- Parameters:
latLng- lat lng locationzoom- zoom level- Returns:
- WGS84 bounding box
- Since:
- 6.2.0
-
tileBounds
public static BoundingBox tileBounds(Point point, double zoom)
Get the WGS84 bounds of the tile at the point coordinate and zoom level- Parameters:
point- point locationzoom- zoom level- Returns:
- WGS84 bounding box
- Since:
- 6.2.0
-
tileBounds
public static BoundingBox tileBounds(Point point, int zoom)
Get the WGS84 bounds of the tile at the point coordinate and zoom level- Parameters:
point- point locationzoom- zoom level- Returns:
- WGS84 bounding box
- Since:
- 6.2.0
-
tileBounds
public static BoundingBox tileBounds(Projection projection, LatLng latLng, double zoom)
Get the bounds of the tile at the lat lng coordinate and zoom level- Parameters:
projection- desired bounding box projectionlatLng- lat lng locationzoom- zoom level- Returns:
- bounding box
- Since:
- 6.2.0
-
tileBounds
public static BoundingBox tileBounds(Projection projection, LatLng latLng, int zoom)
Get the bounds of the tile at the lat lng coordinate and zoom level- Parameters:
projection- desired bounding box projectionlatLng- lat lng locationzoom- zoom level- Returns:
- bounding box
- Since:
- 6.2.0
-
tileBounds
public static BoundingBox tileBounds(Projection projection, Point point, double zoom)
Get the bounds of the tile at the point coordinate and zoom level- Parameters:
projection- desired bounding box projectionpoint- point locationzoom- zoom level- Returns:
- bounding box
- Since:
- 6.2.0
-
tileBounds
public static BoundingBox tileBounds(Projection projection, Point point, int zoom)
Get the bounds of the tile at the point coordinate and zoom level- Parameters:
projection- desired bounding box projectionpoint- point locationzoom- zoom level- Returns:
- bounding box
- Since:
- 6.2.0
-
isMoreThanMaxFeatures
public boolean isMoreThanMaxFeatures(long tileFeaturesCount)
Determine if the provided count of features in the tile is more than the configured max features per tile- Parameters:
tileFeaturesCount- tile features count- Returns:
- true if more than the max features, false if less than or no configured max features
-
queryFeatures
public FeatureIndexResults queryFeatures(BoundingBox boundingBox)
Query for features in the WGS84 projected bounding box- Parameters:
boundingBox- query bounding box in WGS84 projection- Returns:
- feature index results, must be closed
-
queryFeatures
public FeatureIndexResults queryFeatures(String[] columns, BoundingBox boundingBox)
Query for features in the WGS84 projected bounding box- Parameters:
columns- columnsboundingBox- query bounding box in WGS84 projection- Returns:
- feature index results, must be closed
- Since:
- 3.5.0
-
queryFeatures
public FeatureIndexResults queryFeatures(BoundingBox boundingBox, Projection projection)
Query for features in the bounding box- Parameters:
boundingBox- query bounding boxprojection- bounding box projection- Returns:
- feature index results, must be closed
-
queryFeatures
public FeatureIndexResults queryFeatures(String[] columns, BoundingBox boundingBox, Projection projection)
Query for features in the bounding box- Parameters:
columns- columnsboundingBox- query bounding boxprojection- bounding box projection- Returns:
- feature index results, must be closed
- Since:
- 3.5.0
-
isIndexed
public boolean isIndexed()
Check if the features are indexed- Returns:
- true if indexed
- Since:
- 1.1.1
-
buildMaxFeaturesInfoMessage
public String buildMaxFeaturesInfoMessage(long tileFeaturesCount)
Get a max features information message- Parameters:
tileFeaturesCount- tile features count- Returns:
- max features message
-
buildMapClickMessage
public String buildMapClickMessage(LatLng latLng, View view, GoogleMap map)
Perform a query based upon the map click location and build a info message- Parameters:
latLng- locationview- viewmap- Google Map- Returns:
- information message on what was clicked, or null
-
buildMapClickMessage
public String buildMapClickMessage(LatLng latLng, View view, GoogleMap map, Projection projection)
Perform a query based upon the map click location and build a info message- Parameters:
latLng- locationview- viewmap- Google Mapprojection- desired geometry projection- Returns:
- information message on what was clicked, or null
- Since:
- 1.2.7
-
buildMapClickMessageWithMapBounds
public String buildMapClickMessageWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds)
Perform a query based upon the map click location and build a info message- Parameters:
latLng- locationzoom- current zoom levelmapBounds- map view bounds- Returns:
- information message on what was clicked, or nil
- Since:
- 6.3.1
-
buildMapClickMessageWithMapBounds
public String buildMapClickMessageWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, Projection projection)
Perform a query based upon the map click location and build a info message- Parameters:
latLng- locationzoom- current zoom levelmapBounds- map view boundsprojection- desired geometry projection- Returns:
- information message on what was clicked, or nil
- Since:
- 6.3.1
-
buildMapClickMessageWithMapBounds
public String buildMapClickMessageWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance)
Perform a query based upon the map click location and build a info message- Parameters:
latLng- locationzoom- current zoom levelmapBounds- map view boundstolerance- tolerance distance- Returns:
- information message on what was clicked, or nil
- Since:
- 2.0.0
-
buildMapClickMessageWithMapBounds
public String buildMapClickMessageWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance, Projection projection)
Perform a query based upon the map click location and build a info message- Parameters:
latLng- locationzoom- current zoom levelmapBounds- map view boundstolerance- tolerance distanceprojection- desired geometry projection- Returns:
- information message on what was clicked, or nil
- Since:
- 2.0.0
-
buildMapClickTableData
public FeatureTableData buildMapClickTableData(LatLng latLng, View view, GoogleMap map)
Perform a query based upon the map click location and build feature table data- Parameters:
latLng- locationview- viewmap- Google Map- Returns:
- table data on what was clicked, or null
- Since:
- 1.2.7
-
buildMapClickTableData
public FeatureTableData buildMapClickTableData(LatLng latLng, View view, GoogleMap map, Projection projection)
Perform a query based upon the map click location and build feature table data- Parameters:
latLng- locationview- viewmap- Google Mapprojection- desired geometry projection- Returns:
- table data on what was clicked, or null
- Since:
- 1.2.7
-
buildMapClickTableDataWithMapBounds
public FeatureTableData buildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds)
Perform a query based upon the map click location and build feature table data- Parameters:
latLng- locationzoom- current zoom levelmapBounds- map view bounds- Returns:
- table data on what was clicked, or null
- Since:
- 6.3.1
-
buildMapClickTableDataWithMapBounds
public FeatureTableData buildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, Projection projection)
Perform a query based upon the map click location and build feature table data- Parameters:
latLng- locationzoom- current zoom levelmapBounds- map view boundsprojection- desired geometry projection- Returns:
- table data on what was clicked, or null
- Since:
- 6.3.1
-
buildMapClickTableDataWithMapBounds
public FeatureTableData buildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance)
Perform a query based upon the map click location and build feature table data- Parameters:
latLng- locationzoom- current zoom levelmapBounds- map view boundstolerance- distance tolerance- Returns:
- table data on what was clicked, or null
- Since:
- 2.0.0
-
buildMapClickTableDataWithMapBounds
public FeatureTableData buildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance, Projection projection)
Perform a query based upon the map click location and build feature table data- Parameters:
latLng- locationzoom- current zoom levelmapBounds- map view boundstolerance- distance toleranceprojection- desired geometry projection- Returns:
- table data on what was clicked, or null
- Since:
- 2.0.0
-
-