4

I have a shapefile with this projection:

PROJCS["RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199432955]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",155000],PARAMETER["False_Northing",463000],PARAMETER["Central_Meridian",5.38763888888889],PARAMETER["Scale_Factor",0.9999079],PARAMETER["Latitude_Of_Origin",52.15616055555555],UNIT["Meter",1]]

Now I want to reproject the shapefile to lat/lng coordinates.

I tried:

Shapefile tmpShape = Shapefile.OpenFile(file);    
tmpShape.Reproject(KnownCoordinateSystems.Geographic.World.WGS1984);

The lat/lng area of the shapefile should be something like 52,.../4,... . But after reprojecting the file with DotSpatial, I got something like -37,.../23,...

What did I do wrong?

6
  • No idea, but you could try querying tmpShape's coordinate system to see if the software is interpreting it correctly. The wkt is Esri's version; it's possible that dotSpatial is able to read it completely.
    – mkennedy
    Commented Jul 13, 2015 at 16:28
  • I left out a very important "not" there, as in "not able to read it completely."
    – mkennedy
    Commented Jul 13, 2015 at 18:48
  • I dont know what exactly do you mean. The tmpShape.ProjectionString is " +x_0=155000 +y_0=463000 +k_0=0.9999079 +lat_0=52.156160555555552 +lon_0=5.38763888888889 +proj=sterea +towgs84=565.2369,50.0087,465.658,-83920.3484091603,72343.8075715773,-385786.84069442,3081200 +ellps=bessel +no_defs"
    – CPA
    Commented Jul 13, 2015 at 21:37
  • Thanks for posting the PROJ.4 string. I think the +towgs84 is wrong. The 4th - 6th values should be in arc-seconds and the 7th in parts per million. Here's what they should be: -0.40685733, 0.35073268, -1.87034738, and 4.0812.
    – mkennedy
    Commented Jul 13, 2015 at 21:49
  • Thanks a lot! What is the best way to change the string? Should I change the .prj file or after open the file in c#?
    – CPA
    Commented Jul 13, 2015 at 22:00

1 Answer 1

0

Given an Esri coordinate reference system prj file (well-known text aka WKT), for RD New, DotSpatial is able to map it to a PROJ.4 string. RD New has an EPSG well-known ID of 28992.

DotSpatial includes a +towgs84 parameter which is not part of the original wkt:

+towgs84=565.2369,50.0087,465.658,-83920.3484091603,72343.8075715773,-385786.840‌​69442,3081200

The values are supposed to be for a Position Vector-based 7 parameter datum transformation where the seven values are:

x axis translation (meters) 
y axis translation (meters) 
z axis translation (meters) 
x axis rotation (arc-seconds) 
y axis rotation (arc-seconds) 
z axis rotation (arc-seconds) 
scale difference (parts per million)

The original definition in the EPSG dataset gives the rotations in micro-radians. I wondered how on earth they managed to get such large rotation values. If I convert the original micro-radian value of the x axis rotation, 1.9725, to arc-seconds, I get:

0.40685733

If I then treat this value as radians, I get:

83920.34841 = 0.40685733 * (180.0 / PI) * 3600

I can sort of see what they did to the scale difference value, but haven't worked out the math. The original value is 4.0812 ppm. Multiply that by 1000000 and you get 4081200, then they subtracted a million.

1
  • I set a new projection string: tmpShape.ProjectionString = +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs.
    – CPA
    Commented Jul 14, 2015 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.