mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Class names in Debug output
This commit is contained in:
parent
84cd6e2f9a
commit
aa6018cf0e
|
|
@ -39,7 +39,7 @@ namespace MapControl.Caching
|
|||
try
|
||||
{
|
||||
fileDb.Open(path);
|
||||
Debug.WriteLine($"FileDbCache: Opened database {path}");
|
||||
Debug.WriteLine($"{nameof(FileDbCache)}: Opened database {path}");
|
||||
|
||||
Clean();
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ namespace MapControl.Caching
|
|||
new Field(expiresField, DataTypeEnum.DateTime)
|
||||
});
|
||||
|
||||
Debug.WriteLine($"FileDbCache: Created database {path}");
|
||||
Debug.WriteLine($"{nameof(FileDbCache)}: Created database {path}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"FileDbCache.Get({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(FileDbCache)}.Get({key}): {ex.Message}");
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
@ -143,7 +143,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"FileDbCache.Set({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(FileDbCache)}.Set({key}): {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"FileDbCache.Remove({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(FileDbCache)}.Remove({key}): {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ namespace MapControl.Caching
|
|||
|
||||
if (deleted > 0)
|
||||
{
|
||||
Debug.WriteLine($"FileDbCache: Deleted {deleted} expired items");
|
||||
Debug.WriteLine($"{nameof(FileDbCache)}: Deleted {deleted} expired items");
|
||||
fileDb.Clean();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace MapControl.Caching
|
|||
command.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
Debug.WriteLine($"SQLiteCache: Opened database {path}");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}: Opened database {path}");
|
||||
|
||||
Clean();
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"SQLiteCache.Get({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}.Get({key}): {ex.Message}");
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
@ -96,7 +96,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"SQLiteCache.GetAsync({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}.GetAsync({key}): {ex.Message}");
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
@ -115,7 +115,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"SQLiteCache.Set({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}.Set({key}): {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"SQLiteCache.SetAsync({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}.SetAsync({key}): {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"SQLiteCache.Remove({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}.Remove({key}): {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"SQLiteCache.RemoveAsync({key}): {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}.RemoveAsync({key}): {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ namespace MapControl.Caching
|
|||
var deleted = (long)command.ExecuteScalar();
|
||||
if (deleted > 0)
|
||||
{
|
||||
Debug.WriteLine($"SQLiteCache: Deleted {deleted} expired items");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}: Deleted {deleted} expired items");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -211,7 +211,7 @@ namespace MapControl.Caching
|
|||
var deleted = (long)await command.ExecuteScalarAsync();
|
||||
if (deleted > 0)
|
||||
{
|
||||
Debug.WriteLine($"SQLiteCache: Deleted {deleted} expired items");
|
||||
Debug.WriteLine($"{nameof(SQLiteCache)}: Deleted {deleted} expired items");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ namespace MapControl.MBTiles
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"MBTileLayer: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(MBTileLayer)}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ namespace MapControl.MBTiles
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"MBTileSource: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(MBTileSource)}: {ex.Message}");
|
||||
}
|
||||
|
||||
return image;
|
||||
|
|
|
|||
|
|
@ -59,12 +59,12 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"BingMapsTileLayer: {metadataUri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(BingMapsTileLayer)}: {metadataUri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.WriteLine("BingMapsTileLayer requires a Bing Maps API Key");
|
||||
Debug.WriteLine($"{nameof(BingMapsTileLayer)} requires a Bing Maps API Key");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"GeoImage: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(GeoImage)}: {sourcePath}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -138,13 +138,11 @@ namespace MapControl
|
|||
|
||||
private static async Task<GeoBitmap> ReadWorldFileImageAsync(string sourcePath, string worldFilePath)
|
||||
{
|
||||
var geoBitmap = new GeoBitmap();
|
||||
|
||||
geoBitmap.Bitmap = (BitmapSource)await ImageLoader.LoadImageAsync(sourcePath);
|
||||
|
||||
geoBitmap.Transform = await Task.Run(() => ReadWorldFileMatrix(worldFilePath));
|
||||
|
||||
return geoBitmap;
|
||||
return new GeoBitmap
|
||||
{
|
||||
Bitmap = (BitmapSource)await ImageLoader.LoadImageAsync(sourcePath),
|
||||
Transform = await Task.Run(() => ReadWorldFileMatrix(worldFilePath))
|
||||
};
|
||||
}
|
||||
|
||||
private static Matrix ReadWorldFileMatrix(string worldFilePath)
|
||||
|
|
@ -170,7 +168,7 @@ namespace MapControl
|
|||
parameters[5]); // line 6: F or OffsetY
|
||||
}
|
||||
|
||||
private static MapProjection GetProjection(string sourcePath, short[] geoKeyDirectory)
|
||||
private static MapProjection GetProjection(short[] geoKeyDirectory)
|
||||
{
|
||||
MapProjection projection = null;
|
||||
|
||||
|
|
@ -181,7 +179,7 @@ namespace MapControl
|
|||
int epsgCode = geoKeyDirectory[i + 3];
|
||||
|
||||
projection = MapProjectionFactory.Instance.GetProjection(epsgCode) ??
|
||||
throw new ArgumentException($"Can not create projection EPSG:{epsgCode} in {sourcePath}.");
|
||||
throw new ArgumentException($"Can not create projection EPSG:{epsgCode}.");
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"GroundOverlayPanel: {sourcePath}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(GroundOverlay)}: {sourcePath}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace MapControl.Caching
|
|||
|
||||
rootPath = path;
|
||||
|
||||
Debug.WriteLine($"ImageFileCache: {rootPath}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: {rootPath}");
|
||||
|
||||
ThreadPool.QueueUserWorkItem(o => Clean());
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed reading {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed reading {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed reading {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed reading {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed writing {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed writing {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed writing {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed writing {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed deleting {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed deleting {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed deleting {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed deleting {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ namespace MapControl.Caching
|
|||
|
||||
if (deletedFileCount > 0)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Deleted {deletedFileCount} expired files.");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Deleted {deletedFileCount} expired files.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Invalid key {key}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Invalid key {key}: {ex.Message}");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
@ -264,7 +264,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed cleaning {directory.FullName}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed cleaning {directory.FullName}: {ex.Message}");
|
||||
}
|
||||
|
||||
return deletedFileCount;
|
||||
|
|
@ -299,7 +299,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed cleaning {file.FullName}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed cleaning {file.FullName}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageLoader: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageLoader)}: {uri}: {ex.Message}");
|
||||
}
|
||||
|
||||
progress?.Report(1d);
|
||||
|
|
@ -121,13 +121,13 @@ namespace MapControl
|
|||
}
|
||||
else
|
||||
{
|
||||
Debug.WriteLine($"ImageLoader: {uri}: {(int)responseMessage.StatusCode} {responseMessage.ReasonPhrase}");
|
||||
Debug.WriteLine($"{nameof(ImageLoader)}: {uri}: {(int)responseMessage.StatusCode} {responseMessage.ReasonPhrase}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageLoader: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageLoader)}: {uri}: {ex.Message}");
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"MapImageLayer: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(MapImageLayer)}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"MapOverlaysControl: {sourcePath}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(MapOverlaysPanel)}: {sourcePath}: {ex.Message}");
|
||||
|
||||
overlay = new MapPanel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"MapPanel.ArrangeOverride: {element}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(MapPanel)}.{nameof(ArrangeOverride)}: {element}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"TileImageLoader: {tile.ZoomLevel}/{tile.Column}/{tile.Row}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(TileImageLoader)}: {tile.ZoomLevel}/{tile.Column}/{tile.Row}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"TileImageLoader.Cache.GetAsync: {cacheKey}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(TileImageLoader)}.{nameof(Cache)}.{nameof(Cache.GetAsync)}: {cacheKey}: {ex.Message}");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"TileImageLoader.Cache.SetAsync: {cacheKey}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(TileImageLoader)}.{nameof(Cache)}.{nameof(Cache.SetAsync)}: {cacheKey}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"WmsImageLayer: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(WmsImageLayer)}: {uri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"WmsImageLayer: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(WmsImageLayer)}: {uri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -334,7 +334,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"WmsImageLayer: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(WmsImageLayer)}: {uri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"WmtsTileLayer: {CapabilitiesUri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(WmtsTileLayer)}: {CapabilitiesUri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace MapControl.Caching
|
|||
{
|
||||
rootFolder = folder ?? throw new ArgumentException($"The {nameof(folder)} argument must not be null or empty.", nameof(folder));
|
||||
|
||||
Debug.WriteLine($"ImageFileCache: {rootFolder.Path}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: {rootFolder.Path}");
|
||||
|
||||
_ = Task.Factory.StartNew(CleanAsync, TaskCreationOptions.LongRunning);
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed reading {key}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed reading {key}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed writing {key}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed writing {key}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ namespace MapControl.Caching
|
|||
|
||||
if (deletedFileCount > 0)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Deleted {deletedFileCount} expired files.");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Deleted {deletedFileCount} expired files.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed cleaning {folder.Path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed cleaning {folder.Path}: {ex.Message}");
|
||||
}
|
||||
|
||||
return deletedFileCount;
|
||||
|
|
@ -200,7 +200,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed cleaning {file.Path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed cleaning {file.Path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ namespace MapControl
|
|||
{
|
||||
public partial class GeoImage
|
||||
{
|
||||
private static async Task<GeoBitmap> ReadGeoTiffAsync(string sourcePath)
|
||||
private static Task<GeoBitmap> ReadGeoTiffAsync(string sourcePath)
|
||||
{
|
||||
return await Task.Run(() =>
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var geoBitmap = new GeoBitmap();
|
||||
|
||||
|
|
@ -42,12 +42,12 @@ namespace MapControl
|
|||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException($"No coordinate transformation found in {sourcePath}.");
|
||||
throw new ArgumentException("No coordinate transformation found.");
|
||||
}
|
||||
|
||||
if (metadata.GetQuery(QueryString(GeoKeyDirectoryTag)) is short[] geoKeyDirectory)
|
||||
{
|
||||
geoBitmap.Projection = GetProjection(sourcePath, geoKeyDirectory);
|
||||
geoBitmap.Projection = GetProjection(geoKeyDirectory);
|
||||
}
|
||||
|
||||
if (metadata.GetQuery(QueryString(NoDataTag)) is string noData &&
|
||||
|
|
|
|||
|
|
@ -54,13 +54,13 @@ namespace MapControl
|
|||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException($"No coordinate transformation found in {sourcePath}.");
|
||||
throw new ArgumentException("No coordinate transformation found.");
|
||||
}
|
||||
|
||||
if (metadata.TryGetValue(geoKeyDirectoryQuery, out BitmapTypedValue geoKeyDirValue) &&
|
||||
geoKeyDirValue.Value is short[] geoKeyDirectory)
|
||||
{
|
||||
geoBitmap.Projection = GetProjection(sourcePath, geoKeyDirectory);
|
||||
geoBitmap.Projection = GetProjection(geoKeyDirectory);
|
||||
}
|
||||
|
||||
return geoBitmap;
|
||||
|
|
|
|||
Loading…
Reference in a new issue