Package com.graphhopper.reader.osm.pbf
Class PbfFieldDecoder
java.lang.Object
com.graphhopper.reader.osm.pbf.PbfFieldDecoder
Manages decoding of the lower level PBF data structures.
- Author:
- Brett Henderson
-
Constructor Summary
ConstructorsConstructorDescriptionPbfFieldDecoder
(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock primitiveBlock) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptiondouble
decodeLatitude
(long rawLatitude) Decodes a raw latitude value into degrees.double
decodeLongitude
(long rawLongitude) Decodes a raw longitude value into degrees.decodeString
(int rawString) Decodes a raw string into a String.decodeTimestamp
(long rawTimestamp) Decodes a raw timestamp value into a Date.
-
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
Decodes a raw timestamp value into a Date.- Parameters:
rawTimestamp
- The PBF encoded timestamp.- Returns:
- The timestamp as a Date.
-
decodeString
Decodes a raw string into a String.- Parameters:
rawString
- The PBF encoding string.- Returns:
- The string as a String.
-