public static MapData GetASCIIMapData(string mapName) { CreateDataFrame(mapName); MapDataFrame dataFrame = mapDataFrames[mapName]; if (dataFrame.mapData == null) { dataFrame.mapData = ASCIIGridImporter.ReadMapData(GetFilePathByName(mapName, PathDataType.height) + ".txt", GetASCIIMapMetaData(mapName)); mapDataFrames[mapName] = dataFrame; } return(mapDataFrames[mapName].mapData); }
public static MapData ReadMapData(string path, MapMetadata metadata, MapDataType type = MapDataType.ASCIIGrid) { switch (type) { case MapDataType.ASCIIGrid: return(ASCIIGridImporter.ReadMapData(path, (ASCIIGridMetadata)metadata)); case MapDataType.Binary: return(BinaryFileImporter.ReadMapData(path, (BinaryFileMetadata)metadata)); default: throw new System.NotImplementedException("Type " + type + " not implemented!"); } }