Example #1
0
        internal static void ReadOptionalFields(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder)
        {
            OptionalFields optionalFields = new OptionalFields(readBuffer.ReadByte());

            mapFileInfoBuilder.optionalFields = optionalFields;
            optionalFields.ReadOptionalFields(readBuffer);
        }
Example #2
0
        internal static void ReadBoundingBox(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder)
        {
            double minLatitude  = PointUtils.MicrodegreesToDegrees(readBuffer.ReadInt());
            double minLongitude = PointUtils.MicrodegreesToDegrees(readBuffer.ReadInt());
            double maxLatitude  = PointUtils.MicrodegreesToDegrees(readBuffer.ReadInt());
            double maxLongitude = PointUtils.MicrodegreesToDegrees(readBuffer.ReadInt());

            mapFileInfoBuilder.boundingBox = new BoundingBox(minLongitude, minLatitude, maxLongitude, maxLatitude);
        }
Example #3
0
        internal static void ReadPoiTags(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder)
        {
            int numberOfPoiTags = readBuffer.ReadShort();
            var poiTags         = new string[numberOfPoiTags];

            for (int currentTagId = 0; currentTagId < numberOfPoiTags; ++currentTagId)
            {
                string tag = readBuffer.ReadUTF8EncodedString();
                poiTags[currentTagId] = tag;
            }
            mapFileInfoBuilder.poiTags = poiTags;
        }
Example #4
0
 internal MapFileInfo(MapFileInfoBuilder mapFileInfoBuilder)
 {
     FileSize         = mapFileInfoBuilder.fileSize;
     FileVersion      = mapFileInfoBuilder.fileVersion;
     BoundingBox      = mapFileInfoBuilder.boundingBox;
     MapDate          = mapFileInfoBuilder.mapDate;
     NumberOfSubFiles = mapFileInfoBuilder.numberOfSubFiles;
     PoiTags          = mapFileInfoBuilder.poiTags;
     ProjectionName   = mapFileInfoBuilder.projectionName;
     TilePixelSize    = mapFileInfoBuilder.tilePixelSize;
     WayTags          = mapFileInfoBuilder.wayTags;
     ZoomLevelMax     = mapFileInfoBuilder.zoomLevelMax;
     ZoomLevelMin     = mapFileInfoBuilder.zoomLevelMin;
 }
Example #5
0
        internal static void ReadTilePixelSize(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder)
        {
            int tilePixelSize = readBuffer.ReadShort();

            mapFileInfoBuilder.tilePixelSize = tilePixelSize;
        }
Example #6
0
        internal static void ReadProjectionName(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder)
        {
            string projectionName = readBuffer.ReadUTF8EncodedString();

            mapFileInfoBuilder.projectionName = projectionName;
        }
Example #7
0
        internal static void ReadMapDate(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder)
        {
            long mapDate = readBuffer.ReadLong();

            mapFileInfoBuilder.mapDate = mapDate;
        }
Example #8
0
        internal static void ReadFileVersion(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder)
        {
            int fileVersion = readBuffer.ReadInt();

            mapFileInfoBuilder.fileVersion = fileVersion;
        }
Example #9
0
        internal static void ReadFileSize(ReadBuffer readBuffer, long fileSize, MapFileInfoBuilder mapFileInfoBuilder)
        {
            long headerFileSize = readBuffer.ReadLong();

            mapFileInfoBuilder.fileSize = fileSize;
        }