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 Details

    • FeatureOverlayQuery

      public FeatureOverlayQuery(Context context, FeatureOverlay featureOverlay)
      Constructor
      Parameters:
      context - context
      featureOverlay - feature overlay
    • FeatureOverlayQuery

      public FeatureOverlayQuery(Context context, BoundedOverlay boundedOverlay, FeatureTiles featureTiles)
      Constructor
      Parameters:
      context - context
      boundedOverlay - bounded overlay
      featureTiles - feature tiles
      Since:
      1.2.5
  • Method Details

    • 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 map
      latLng - 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 level
      latLng - 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 location
      zoom - 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 location
      zoom - 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 location
      zoom - 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 location
      zoom - 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 location
      zoom - 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 location
      zoom - 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 location
      zoom - 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 location
      zoom - 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 projection
      latLng - lat lng location
      zoom - 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 projection
      latLng - lat lng location
      zoom - 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 projection
      point - point location
      zoom - 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 projection
      point - point location
      zoom - 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 - columns
      boundingBox - 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 box
      projection - 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 - columns
      boundingBox - query bounding box
      projection - 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 - location
      view - view
      map - 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 - location
      view - view
      map - Google Map
      projection - 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 - location
      zoom - current zoom level
      mapBounds - 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 - location
      zoom - current zoom level
      mapBounds - map view bounds
      projection - 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 - location
      zoom - current zoom level
      mapBounds - map view bounds
      tolerance - 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 - location
      zoom - current zoom level
      mapBounds - map view bounds
      tolerance - tolerance distance
      projection - 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 - location
      view - view
      map - 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 - location
      view - view
      map - Google Map
      projection - 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 - location
      zoom - current zoom level
      mapBounds - 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 - location
      zoom - current zoom level
      mapBounds - map view bounds
      projection - 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 - location
      zoom - current zoom level
      mapBounds - map view bounds
      tolerance - 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 - location
      zoom - current zoom level
      mapBounds - map view bounds
      tolerance - distance tolerance
      projection - desired geometry projection
      Returns:
      table data on what was clicked, or null
      Since:
      2.0.0