Class ElevationDecoder

java.lang.Object
com.massifmaps.rastertiles.ElevationDecoder
Direct Known Subclasses:
MapBoxElevationDataDecoder, TerrariumElevationDataDecoder

public class ElevationDecoder extends Object
Abstract base class for raster elevation decoders.
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value of this object.
    • getMinimumHeightScale

      public float getMinimumHeightScale()
    • getENCODING_KEY

      public static String getENCODING_KEY()
      The meta data key naming the DEM pixel encoding, "mapbox" or "terrarium".
    • resolve

      Resolves the decoder for one elevation tile: the tile's own "dem_encoding" first - two
      sources of different encodings can sit behind one OrderedTileDataSource, and only the
      tile knows which answered - then the source's, then 'preferred', then MapBox.
      Both arguments may be null. The returned decoders are shared singletons.
      Parameters:
      tileData - The loaded elevation tile, or null.
      dataSource - The elevation data source, or null.
      preferred - The decoder the caller was configured with, or null.
      Returns:
      The decoder to decode this tile with. Never null.