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,
Rendering .shp file with ITiledProvider
Re: Rendering .shp file with ITiledProvider
Please see http://xserver.ptvgroup.com/forum/viewt ... f=14&t=383 for a first answer.
Frank Gailfuß
PTV GROUP Germany
PTV GROUP Germany
Re: Rendering .shp file with ITiledProvider
SharpMap 1.1 requires some additional references and uses GeoAPI.Geometries.Envolope instead of SharpMap.Geometries.BoundingBox to express rectangles and bounding boxes. The latter change is crucial as ShapMap changes the order of the coordinates in some places - once that is fixed, the demo initially attached to http://xserver.ptvgroup.com/forum/viewt ... f=14&t=383 runs well with SharpMap 1.1 and your logicx.shp Shapefile. Please find an updated demo attached. We'll check if we incorporate SharpMap 1.1 into DemoCenter with the next release.
- Attachments
-
- ShapeDemo.rar
- Shape Demo based on SharpMap 1.1
- (3.27 MiB) Downloaded 412 times
Frank Gailfuß
PTV GROUP Germany
PTV GROUP Germany
Re: Rendering .shp file with ITiledProvider
Frank,
Thanks for the reply and the research work. I'll forward the information to the customer.
Thanks for the reply and the research work. I'll forward the information to the customer.