Package org.oscim.tiling.source
Class PbfDecoder
java.lang.Object
org.oscim.tiling.source.PbfDecoder
- All Implemented Interfaces:
ITileDecoder
- Direct Known Subclasses:
TileDecoder,TileDecoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected intprotected intprotected static final booleanprotected static final org.oscim.tiling.source.PbfDecoder.ProtobufExceptionprotected static final org.oscim.tiling.source.PbfDecoder.ProtobufException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected doubleprotected floatprotected intdecodeInterleavedPoints(GeometryBuffer geom, float scale) protected intdecodeInterleavedPoints3D(float[] coords, float scale) protected Stringprotected short[]decodeUnsignedVarintArray(short[] array) fill short array from packed uint32.protected intprotected intprotected longvoiddecodeVarintArray(int num, int[] array) protected static intdeZigZag(int val) protected voidintfillBuffer(int size) booleanhasData()intposition()protected static intreadUnsignedInt(InputStream is, byte[] buf) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.oscim.tiling.source.ITileDecoder
decode
-
Field Details
-
debug
protected static final boolean debug- See Also:
-
INVALID_VARINT
protected static final org.oscim.tiling.source.PbfDecoder.ProtobufException INVALID_VARINT -
INVALID_PACKED_SIZE
protected static final org.oscim.tiling.source.PbfDecoder.ProtobufException INVALID_PACKED_SIZE -
buffer
protected byte[] buffer -
bufferPos
protected int bufferPos -
bufferFill
protected int bufferFill
-
-
Constructor Details
-
PbfDecoder
public PbfDecoder()
-
-
Method Details
-
error
- Throws:
IOException
-
setInputStream
-
decodeVarint32
- Throws:
IOException
-
decodeVarint64
- Throws:
IOException
-
decodeString
- Throws:
IOException
-
decodeFloat
- Throws:
IOException
-
decodeDouble
- Throws:
IOException
-
decodeBool
- Throws:
IOException
-
decodeInterleavedPoints
- Throws:
IOException
-
decodeInterleavedPoints3D
- Throws:
IOException
-
deZigZag
protected static int deZigZag(int val) -
decodeVarintArray
- Throws:
IOException
-
decodeUnsignedVarintArray
fill short array from packed uint32. Array values must be positive as the end will be marked by -1 if the resulting array is larger than the input!- Throws:
IOException
-
decodeVarint32Filled
- Throws:
IOException
-
hasData
- Throws:
IOException
-
position
public int position() -
fillBuffer
- Throws:
IOException
-
readUnsignedInt
- Throws:
IOException
-