internal static void ReadOptionalFields(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder) { OptionalFields optionalFields = new OptionalFields(readBuffer.ReadByte()); mapFileInfoBuilder.optionalFields = optionalFields; optionalFields.ReadOptionalFields(readBuffer); }
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); }
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; }
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; }
internal static void ReadTilePixelSize(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder) { int tilePixelSize = readBuffer.ReadShort(); mapFileInfoBuilder.tilePixelSize = tilePixelSize; }
internal static void ReadProjectionName(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder) { string projectionName = readBuffer.ReadUTF8EncodedString(); mapFileInfoBuilder.projectionName = projectionName; }
internal static void ReadMapDate(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder) { long mapDate = readBuffer.ReadLong(); mapFileInfoBuilder.mapDate = mapDate; }
internal static void ReadFileVersion(ReadBuffer readBuffer, MapFileInfoBuilder mapFileInfoBuilder) { int fileVersion = readBuffer.ReadInt(); mapFileInfoBuilder.fileVersion = fileVersion; }
internal static void ReadFileSize(ReadBuffer readBuffer, long fileSize, MapFileInfoBuilder mapFileInfoBuilder) { long headerFileSize = readBuffer.ReadLong(); mapFileInfoBuilder.fileSize = fileSize; }