Rendering .shp file with ITiledProvider
Posted: Fri Sep 16, 2016 8:26 am
Hello all,
One of our customers who's experimenting with rendering .shp files in the .NET Mapcontrol (and is also the customer from issue http://xserver.ptvgroup.com/forum/viewt ... f=14&t=383 ) has the following issue:
The customer used the example from the .NET Mapcontrol documentation "Show a Shape File Content - Using a tiled provider" to display a custom .shp file in the map. However, the areas were drawn at different (wrong locations), so the customer began to troubleshoot by copying the code and needed sources and resources into a blank project.
His findings:
- When using the SharpMap and ProjNet dll from 'our' xServer .NET directory, all is well and the areas are drawn correctly
- However, the customer uses NuGet to obtain the correct packages, and this is also his preferred method. When adding the SharpMap package, the problem appears. To get it working again, the customer had to change some 'using' statements; apparently this has changed in the newer version of the SharpMap package. See the 16.patch file; - has been removed, + has been added. (This is a patch file for Mercurial in which you can see the differences between 'our' DLL's and the DLL's from NuGet, mostly "using" statements).
What stands out is that the customer has to use both GeoAPI.CoordinateSystems.Transformations and ProjNet.CoordinateSystems.Transformations to be able to compile the project again. He thinks this is why the coordinate transformations go wrong.
Customer is using Visual Studio 2012. I've combined all the needed files into this download link: https://ptvbox.ptvgroup.com/index.php/s/FNCyX9NlLK86jwg
Could you have a look and see what might be causing the coordinate shift when using NuGet?
Thanks in advance,
One of our customers who's experimenting with rendering .shp files in the .NET Mapcontrol (and is also the customer from issue http://xserver.ptvgroup.com/forum/viewt ... f=14&t=383 ) has the following issue:
The customer used the example from the .NET Mapcontrol documentation "Show a Shape File Content - Using a tiled provider" to display a custom .shp file in the map. However, the areas were drawn at different (wrong locations), so the customer began to troubleshoot by copying the code and needed sources and resources into a blank project.
His findings:
- When using the SharpMap and ProjNet dll from 'our' xServer .NET directory, all is well and the areas are drawn correctly
- However, the customer uses NuGet to obtain the correct packages, and this is also his preferred method. When adding the SharpMap package, the problem appears. To get it working again, the customer had to change some 'using' statements; apparently this has changed in the newer version of the SharpMap package. See the 16.patch file; - has been removed, + has been added. (This is a patch file for Mercurial in which you can see the differences between 'our' DLL's and the DLL's from NuGet, mostly "using" statements).
What stands out is that the customer has to use both GeoAPI.CoordinateSystems.Transformations and ProjNet.CoordinateSystems.Transformations to be able to compile the project again. He thinks this is why the coordinate transformations go wrong.
Customer is using Visual Studio 2012. I've combined all the needed files into this download link: https://ptvbox.ptvgroup.com/index.php/s/FNCyX9NlLK86jwg
Could you have a look and see what might be causing the coordinate shift when using NuGet?
Thanks in advance,