Beispiel #1
0
 public static BinaryFileMetadata GetBinaryMapMetaData(string mapName)
 {
     CreateDataFrame(mapName);
     if (mapDataFrames[mapName].binaryMapMetaData == null)
     {
         MapDataFrame dataFrame = mapDataFrames[mapName];
         dataFrame.binaryMapMetaData = BinaryFileImporter.ReadMetadata(GetFilePathByName(mapName, PathDataType.height) + ".hdr");
         mapDataFrames[mapName]      = dataFrame;
     }
     return(mapDataFrames[mapName].binaryMapMetaData);
 }
Beispiel #2
0
    public static MapData GetBinaryMapData(string mapName)
    {
        CreateDataFrame(mapName);
        MapDataFrame dataFrame = mapDataFrames[mapName];

        if (dataFrame.mapData == null)
        {
            dataFrame.mapData      = BinaryFileImporter.ReadMapData(GetFilePathByName(mapName, PathDataType.height) + ".bin", GetBinaryMapMetaData(mapName));
            mapDataFrames[mapName] = dataFrame;
        }
        return(mapDataFrames[mapName].mapData);
    }
Beispiel #3
0
    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!");
        }
    }