This project has moved. For the latest updates, please go here.

Reading shapefiles

Topics: SharpMap v0.9 / v1.x
Feb 25, 2010 at 1:26 PM


I'm trying to read shapefiles that are read correctly by other tools:  (, .


If I want it to be read correctly by SharpMap I had to change the following code in  Data/Providers/ShapeFile.cs:

Function ReadGeometry Line 929:


new Point(brShapeFile.ReadDouble(), brShapeFile.ReadDouble()));


new Point(brShapeFile.ReadDouble() / 100000, brShapeFile.ReadDouble() / 100000));

I don't think I'm supposed to do this to have a working version.

Does anybody know what I'm doing wrong?

Sofware version: v.0.9.3708.27057



Feb 25, 2010 at 2:44 PM

Sounds like a coordinate system problem.  Shapefiles come in many different coordinate systems.

Use one of the viewers you mentioned to determine what coordinate system the shapefile is in.

Is that what you expected?   If not, you can use a viewer like MapViewer to change the coordinate system.

Feb 25, 2010 at 2:57 PM

Thanks for your reply.

Apparantly transformations are executed every time when you render!

That was a little confusing.