java.lang.Object
com.here.platform.location.integration.optimizedmap.TileWeighers

public class TileWeighers extends Object
Collection of tile weighers for each tile type.

Each weigher estimates the in-memory size (in bytes) of a decoded tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

Using accurate weigher functions helps to optimize memory usage and maintain efficient cache behavior.

  • Constructor Details

    • TileWeighers

      public TileWeighers()
  • Method Details

    • geometry

      public static int geometry(GeometryTile tile)
      Weigher for the Geometry tile.

      Estimates the in-memory size (in bytes) of the given Geometry tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

      Parameters:
      tile - The decoded Geometry tile to estimate.
      Returns:
      Estimated size in bytes of the Geometry tile.
    • undirectedProperty

      public static int undirectedProperty(UndirectedPropertyTile<Object> tile)
      Weigher for the Undirected Property tile.

      Estimates the in-memory size (in bytes) of the given Undirected Property tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

      Parameters:
      tile - The decoded Undirected Property tile to estimate.
      Returns:
      Estimated size in bytes of the Undirected Property tile.
    • mapping

      public static int mapping(MappingTile tile)
      Weigher for the Mapping tile.

      Estimates the in-memory size (in bytes) of the given Mapping tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

      Parameters:
      tile - The decoded Mapping tile to estimate.
      Returns:
      Estimated size in bytes of the Mapping tile.
    • edgeProperty

      public static int edgeProperty(EdgePropertyTile<Object> tile)
      Weigher for the Edge Property tile.

      Estimates the in-memory size (in bytes) of the given Edge Property tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

      Parameters:
      tile - The decoded Edge Property tile to estimate.
      Returns:
      Estimated size in bytes of the Edge Property tile.
    • routingGraph

      public static int routingGraph(GraphTile tile)
      Weigher for the Graph tile.

      Estimates the in-memory size (in bytes) of the given Graph tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

      Parameters:
      tile - The decoded Graph tile to estimate.
      Returns:
      Estimated size in bytes of the Graph tile.
    • rangeBasedProperty

      public static int rangeBasedProperty(RangeBasedPropertyTile<Object> tile)
      Weigher for the Range Based Property tile.

      Estimates the in-memory size (in bytes) of the given Range Based Property tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

      Parameters:
      tile - The decoded Range Based Property tile to estimate.
      Returns:
      Estimated size in bytes of the Range Based Property tile.
    • multiProperty

      public static int multiProperty(MultiPropertyTile tile)
      Weigher for the Multi Property tile.

      Estimates the in-memory size (in bytes) of the given Multi Property tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

      Parameters:
      tile - The decoded Multi Property tile to estimate.
      Returns:
      Estimated size in bytes of the Multi Property tile.
    • tmcTable

      public static int tmcTable(com.here.platform.pb.location.optimizedmap.tmc.v2.tmc.TmcTablePartition partition)
      Weigher for the Tmc Table tile.

      Estimates the in-memory size (in bytes) of the given Tmc Table tile. Used by caching mechanisms to evaluate memory consumption and decide when to evict tiles based on cache constraints.

      Parameters:
      partition - The decoded Tmc Table tile to estimate.
      Returns:
      Estimated size in bytes of the Tmc Table tile.
    • rangeBasedPropertyTileV2

      public static int rangeBasedPropertyTileV2(RangeBasedPropertyTileV2 tile)
    • pointBasedPropertyTile

      public static int pointBasedPropertyTile(PointBasedPropertyTile tile)
    • entityPropertyTile

      public static int entityPropertyTile(EntityPropertyTile tile)