Closed TimThaler closed 4 months ago
The issue was that the method CreateFromCoordinateSystems
in CoordinateTransformationFactory
received null as the sourceCS
parameter. We solved this by loading WGS84 in the CoordinateSystemServices.
var gcs = GeographicCoordinateSystem.WGS84;
css.AddCoordinateSystem((int)pcs2.AuthorityCode, gcs);
Why this exception only occured with the installation (e.g. the gsc is loaded/not loaded) remains a mystery though :)
This exception occurs in
ProjNet
but i am posting it here since i might do something wrong with SharpMap. We have a shapefile which we want to use as an overlay for a standard -whole world showing - WMTS Webmercator TileAsyncLayer. The WKT representation of the Shapefiles CRS from its*prj
reads like this:In SharpMap the two layers are used like this:
The part i really do not understand is that the following exception only occures after we build the final exe on a Jenkins Server. With a Debug or Release configuration in VisualStudio (Running with or without the Debugger) it works as intended!
The callstack of the exception:
To track if maybbe one of the SRIDs got lost i added, not elegantly, some debuggingToFile to the Getter
There does not seem to be the problem as the output shows:
TargetSRID: 3857 SRD: 4326
. In the final installed directory i replaced every Dll fromProjNet
toSharpMap.*
toNTS
... But everytime the error occurs (only in the installation setup). Running it in VisualStudio it is very smooth and perfectly aligned. This i double checked with loading both layers in QGIS.Why does this error occur and why only in the installation? Any help apprechiated!