Class PbfFieldDecoder

java.lang.Object
com.graphhopper.reader.osm.pbf.PbfFieldDecoder

public class PbfFieldDecoder extends Object
Manages decoding of the lower level PBF data structures.

Author:
Brett Henderson

  • Constructor Details

    • PbfFieldDecoder

      public PbfFieldDecoder(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock primitiveBlock)
      Creates a new instance.

      Parameters:
      primitiveBlock - The primitive block containing the fields to be decoded.
  • Method Details

    • decodeLatitude

      public double decodeLatitude(long rawLatitude)
      Decodes a raw latitude value into degrees.

      Parameters:
      rawLatitude - The PBF encoded value.
      Returns:
      The latitude in degrees.
    • decodeLongitude

      public double decodeLongitude(long rawLongitude)
      Decodes a raw longitude value into degrees.

      Parameters:
      rawLongitude - The PBF encoded value.
      Returns:
      The longitude in degrees.
    • decodeTimestamp

      public Date decodeTimestamp(long rawTimestamp)
      Decodes a raw timestamp value into a Date.

      Parameters:
      rawTimestamp - The PBF encoded timestamp.
      Returns:
      The timestamp as a Date.
    • decodeString

      public String decodeString(int rawString)
      Decodes a raw string into a String.

      Parameters:
      rawString - The PBF encoding string.
      Returns:
      The string as a String.