java.lang.Object
com.here.platform.location.integration.herecommons.geospatial.javadsl.HereTileResolver
All Implemented Interfaces:
Serializable, scala.Serializable

public class HereTileResolver extends Object implements scala.Serializable
Finds tile IDs. For more information on HEREtiles and IDs, see the documentation for com.here.olp.util.quad.HereQuad.

param: outputLevel quadtree level for which tile IDs are returned

See Also:
  • Constructor Details

    • HereTileResolver

      public HereTileResolver(HereTileLevel outputLevel)
  • Method Details

    • boundingBoxOf

      public static BoundingBox boundingBoxOf(TileId tileId)
      Returns the Bounding Box covered by a given input tile.

      Parameters:
      tileId - The tile ID that covers Bounding Box
    • outputLevel

      public HereTileLevel outputLevel()
    • fromCenterAndRadius

      public <GC extends GeoCoordinateHolder> Set<Long> fromCenterAndRadius(GC center, double radiusInMeters)
      Returns the tiles that cover a given circle.

      Use this overload of the method when the geographical coordinate type implements GeoCoordinateHolder.

      Parameters:
      center - Position of the circle center
      radiusInMeters - Radius of the circle
    • fromCenterAndRadius

      public <GC> Set<Long> fromCenterAndRadius(GC center, double radiusInMeters, GeoCoordinateAdapter<GC> adapter)
      Returns the tiles that cover a given circle.

      Use this overload of the method when the geographical coordinate type does not implement GeoCoordinateHolder.

      Parameters:
      center - Position of the circle center
      radiusInMeters - Radius of the circle
    • fromTileWithBuffer

      public Set<Long> fromTileWithBuffer(long tileId, double bufferInMeters)
      Returns the tiles that cover the area of a given tile extended by the given buffer in all directions.

      Parameters:
      tileId - The tile ID used as initial bounding box
      bufferInMeters - The buffer to be added around the tile's bounding box
    • fromBoundingBox

      public Set<Long> fromBoundingBox(BoundingBox bbox)
      Returns the tiles that cover a given bounding box.
    • fromAncestorTile

      public Set<Long> fromAncestorTile(long tileId)
      Returns all descendant tiles for a given tile.

      Parameters:
      tileId - The ancestor tile to be split
    • fromDescendantTile

      public long fromDescendantTile(long tileId)
      Returns the ancestor tile for the output level that is configured for this HereTileResolver.

      Parameters:
      tileId - The descendant tile
    • fromCoordinate

      public <GC extends GeoCoordinateHolder> long fromCoordinate(GC point)
      Returns the tile containing a given point.

      Use this overload of the method when the geographical coordinate type implements GeoCoordinateHolder.

      Parameters:
      point - Position within the tile
    • fromCoordinate

      public <GC> long fromCoordinate(GC point, GeoCoordinateAdapter<GC> adapter)
      Returns the tile containing a given point.

      Use this overload of the method when the geographical coordinate type does not implement GeoCoordinateHolder.

      Parameters:
      point - Position within the tile
      adapter - GeoCoordinateAdapter to extract latitude and longitude for GC
    • fromTile

      public Set<Long> fromTile(long tileId)
      Returns the tiles associated with a given input tile.

      Which tiles that are depends on the zoom level of the input tile compared to the output level that is configured for this HereTileResolver. There are three cases to consider.

      • The level of the input tile is the same as the output level. In this case, only the input tile itself is returned.
      • The input tile is at a lower zoom level than the output level. This means that its area is greater than the area of a single tile at the output level. In this case, the input tile covers multiple tiles at the output level and all of them are returned.
      • The input tile is at a higher zoom level than the output level. This means that its area is smaller than the area of a single tile at the output level. In this case, the input tile is fully contained within a single output level tile and that tile is returned.