This project has moved and is read-only. For the latest updates, please go here.

Projection Polyconic is not supported

Topics: Algorithms, SharpMap v0.9 / v1.x
Aug 14, 2010 at 5:21 PM


I have a bunch of Shape Files in Co-ordinate System Everest_Bangladesh_Polyconic. Secondly, I have polygons stored as Geometry in SQL Server 2008. I would like to overlay the Polygons from database over the polygons from these Shape Files. Below is the code I used to transform the Co-ordinates:

string path = @"D:\SHP Files\luse.shp";

ShapeFile shpProvider = new ShapeFile(path, true);

VectorLayer shpLayer = new VectorLayer("ShapeFileLayer");
shpLayer.DataSource = shpProvider;

FeatureDataTable features = dbFactory.GetFeatures();

VectorLayer polyLayer = new VectorLayer("PolyLayer");
polyLayer.DataSource = new GeometryFeatureProvider(features);

CoordinateSystemFactory cFac = new CoordinateSystemFactory();
ICoordinateSystem wgs84CS = cFac.CreateFromWkt(@"PROJCS[""WGS 84 / UTM zone 13N"",GEOGCS[""WGS 84"",DATUM[""WGS_1984"",SPHEROID[""WGS 84"",6378137,298.257223563,AUTHORITY[""EPSG"",""7030""]],AUTHORITY[""EPSG"",""6326""]],PRIMEM[""Greenwich"",0,AUTHORITY[""EPSG"",""8901""]],UNIT[""degree"",0.01745329251994328,AUTHORITY[""EPSG"",""9122""]],AUTHORITY[""EPSG"",""4326""]],PROJECTION[""Transverse_Mercator""],PARAMETER[""latitude_of_origin"",0],PARAMETER[""central_meridian"",-105],PARAMETER[""scale_factor"",0.9996],PARAMETER[""false_easting"",500000],PARAMETER[""false_northing"",0],UNIT[""metre"",1,AUTHORITY[""EPSG"",""9001""]],AUTHORITY[""EPSG"",""32613""]]");

CoordinateTransformationFactory ctFac = new CoordinateTransformationFactory();

polyLayer.CoordinateTransformation = ctFac.CreateFromCoordinateSystems(shpProvider.CoordinateSystem, wgs84CS);




However, this code throws an exception saying Projection Polyconic is not supported.


Aug 17, 2010 at 9:18 AM

Hello Raghu,

Proj.Net does not support all projections there are (see:

You can either

  • Write your own Polyconic projection class, for math see:
  • convert all your Shapefiles to the SRS of your SqlServer2008 data using ogr2ogr from fwtools package.

I'd go for the second, since you avoid projection calculation on rendering your data.

Hth FObermaier


Aug 22, 2010 at 4:14 PM

Hello FObermaier,

For now I have converted the Shape files using ogr2ogr as per your suggestion, for performance reasons.

However, I would also like to write the Polyconic projection class and submit it to Proj.Net. Will get to it when I find the time to do it.



Aug 23, 2010 at 8:02 AM
kraghavk wrote:
However, I would also like to write the Polyconic projection class and submit it to Proj.Net. Will get to it when I find the time to do it.

That would be really apreciated.

Cheers FObermaier