[GIS] SHP File to .NET Conversion

netshapefile

I have been a .NET programmer for 13 years but I have absolutely no GIS experience and I need a starting point.

I have to take some shape files and overlay them on a graphic of a static map. With the overlays I can then show some data for each polygon I have created. I have the data (xml) and the shp files. How can I get the data from the shp files (I assume its lat/long of all the points that make up the area) and then how can lat/long be converted to x,y to be plotted on a web page.

At this point I am not even sure how to open a SHP file and extract the data. Is there a an API can use to help me to do this. I am going to be using .NET Framework 4.5 Visual Studio 2012.

Best Answer

I would recommend displaying your data using SVG (xml based vector image format). There are tools available to convert shapefiles directly to SVG format, which you can then embed directly on your webpage with html. The SVG file will contain coordinates of your shapefile data in a simple xml format.

A useful tool for this is shp2svg.

https://github.com/gka/shp2svg

How to embed SVG into an HTML webpage:

http://www.w3schools.com/svg/svg_inhtml.asp

What's so great about SVG is its simplicity and familiar format. Plus it's very easy to manipulate with javascript or CSS, to apply nice animations or styling. Take a look at some cool SVG map examples, these should get you interested!

http://www.amcharts.com/svg-maps/

Related Question