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.