Package crosby.binary

Class BinarySerializer

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    public class BinarySerializer
    extends Object
    implements Closeable, Flushable
    Generic serializer common code Serialize a set of blobs and process them. Subclasses implement handlers for different API's (osmosis, mkgmap, splitter, etc.) All data is converted into PrimGroupWriterInterface objects, which are then ordered to process their data at the appropriate time.
    • Field Detail

      • batch_limit

        protected int batch_limit
      • granularity

        protected int granularity
      • date_granularity

        protected int date_granularity
      • omit_metadata

        protected boolean omit_metadata
      • batch_size

        protected int batch_size
        How many primitives have been seen in this batch
      • total_entities

        protected int total_entities
    • Method Detail

      • configGranularity

        public void configGranularity​(int granularity)
        Set the granularity (precision of lat/lon, measured in unites of nanodegrees.
      • configOmit

        public void configOmit​(boolean omit_metadata)
        Set whether metadata is to be omitted
      • configBatchLimit

        public void configBatchLimit​(int batch_limit)
        Configure the maximum number of entities in a batch
      • processBatch

        public void processBatch()
      • mapRawDegrees

        public long mapRawDegrees​(double degrees)
        Convert from a degrees represented as a double into the serialized offset in nanodegrees..
      • mapDegrees

        public int mapDegrees​(double degrees)
        Convert from a degrees represented as a double into the serialized offset.