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

            mapFileInfoBuilder.optionalFields = optionalFields;
            optionalFields.ReadOptionalFields(readBuffer);
        }
示例#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);
        }
示例#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;
        }
示例#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;
 }
示例#5
0
        internal static void ReadTilePixelSize(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder)
        {
            int tilePixelSize = readBuffer.ReadShort();

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

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

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

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

            mapFileInfoBuilder.fileSize = fileSize;
        }