예제 #1
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);
    }
예제 #2
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!");
        }
    }