diff --git a/MapControl/Shared/GeoImage.cs b/MapControl/Shared/GeoImage.cs index f377f885..91e885b7 100644 --- a/MapControl/Shared/GeoImage.cs +++ b/MapControl/Shared/GeoImage.cs @@ -179,10 +179,10 @@ namespace MapControl { if (geoKeyDirectory[i] == ProjectedCRSGeoKey && geoKeyDirectory[i + 1] == 0) { - var crsId = $"EPSG:{geoKeyDirectory[i + 3]}"; + int epsgCode = geoKeyDirectory[i + 3]; - projection = MapProjection.Factory.GetProjection(crsId) ?? - throw new ArgumentException($"Can not create projection {crsId} in {sourcePath}."); + projection = MapProjection.Factory.GetProjection(epsgCode) ?? + throw new ArgumentException($"Can not create projection EPSG:{epsgCode} in {sourcePath}."); break; } diff --git a/MapControl/Shared/GroundOverlay.cs b/MapControl/Shared/GroundOverlay.cs index ea68e242..f6edbd52 100644 --- a/MapControl/Shared/GroundOverlay.cs +++ b/MapControl/Shared/GroundOverlay.cs @@ -131,8 +131,8 @@ namespace MapControl { using (var archive = await Task.Run(() => ZipFile.OpenRead(archiveFilePath))) { - var docEntry = await Task.Run(() => archive.GetEntry("doc.kml") - ?? archive.Entries.FirstOrDefault(e => e.Name.EndsWith(".kml"))); + var docEntry = await Task.Run(() => archive.GetEntry("doc.kml") ?? + archive.Entries.FirstOrDefault(e => e.Name.EndsWith(".kml"))); if (docEntry == null) { diff --git a/MapControl/Shared/WmtsTileLayer.cs b/MapControl/Shared/WmtsTileLayer.cs index 8cd63965..c175fb87 100644 --- a/MapControl/Shared/WmtsTileLayer.cs +++ b/MapControl/Shared/WmtsTileLayer.cs @@ -142,8 +142,8 @@ namespace MapControl foreach (var tileMatrix in currentMatrixes) { - var layer = currentLayers.FirstOrDefault(l => l.WmtsTileMatrix == tileMatrix) - ?? new WmtsTileMatrixLayer(tileMatrix, tileMatrixSet.TileMatrixes.IndexOf(tileMatrix)); + var layer = currentLayers.FirstOrDefault(l => l.WmtsTileMatrix == tileMatrix) ?? + new WmtsTileMatrixLayer(tileMatrix, tileMatrixSet.TileMatrixes.IndexOf(tileMatrix)); if (layer.UpdateTiles(ParentMap.ViewTransform, ParentMap.RenderSize)) { diff --git a/MapProjections/Shared/GeoApiProjection.cs b/MapProjections/Shared/GeoApiProjection.cs index c965af9c..f77e01bf 100644 --- a/MapProjections/Shared/GeoApiProjection.cs +++ b/MapProjections/Shared/GeoApiProjection.cs @@ -72,8 +72,8 @@ namespace MapControl.Projections } else { - var projection = coordinateSystem.Projection - ?? throw new ArgumentException("CoordinateSystem.Projection must not be null.", nameof(value)); + var projection = coordinateSystem.Projection ?? + throw new ArgumentException("CoordinateSystem.Projection must not be null.", nameof(value)); var centralMeridian = projection.GetParameter("central_meridian") ?? projection.GetParameter("longitude_of_origin"); var centralParallel = projection.GetParameter("central_parallel") ?? projection.GetParameter("latitude_of_origin");