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

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

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

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

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

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

            mapFileInfoBuilder.fileSize = fileSize;
        }