Our current project required us to read Shapefile and import the shape (from .shp file) and data (from .dbf file) from the same. We investigated into quite a few tools having the ability to parse a shape file and import the shape (also called Geometries) along with the data into the database. These tools were either not up to the mark or pretty costly. This is when I came across SharpMap which did the trick for us.
SharpMap is an easy-to-use mapping library for use in web and desktop applications. It is an open source under GNU Lesser General license.
Download and import the SharpMap dll
You can download the SharpMap dll from here. Import the compiled dll into the application by browsing downloaded location.
Write code to import Shapefile data
ShapeFileProvider sf = null;
sf = new ShapeFileProvider(filePath);
BoundingBox ext = sf.GetExtents();
FeatureDataSet ds = new FeatureDataSet();
FeatureDataTable<uint> table = ds.Tables
//Read the .dbf data from the row.
foreach (FeatureDataRow row in table.Rows)
Polygon polygon = row.Geometry
if(polygon != null)
foreach (var vertex in polygon.ExteriorRing.Vertices)
double latitude = vertex.Y;
double longitude = vertex.X;
//Import to to the database.
You can write a program which would run once and import all the shapefile data into your database schema. You will, thus, have all the data to play at will. Try it out.
There is, however, a point concern. Microsoft has altered the Terms and conditions for usage. Here is a list of some of the features in the Bing Maps Silverlight Control v1.0:
• Silverlight 3 enabled,
• Position Silverlight UIElements on the Map,
• Data Binding with the MapItemsControl,
• Bing Maps Web Services support,
• World Wrap / infinite pan across the dateline,
• Design-time integration with Expression Blend,
• cool Online Interactive SDK.
Here are some useful links to try out the new Bing Maps Silverlight Control:
• Download Bing Maps Silverlight Control
• Bing Maps Silverlight Control Interactive SDK
• Bing Maps Silverlight Control SDK
• Bing Maps Account Center
Hope this was useful.