3

I need to do some projections between WGS84 (EPSG:4326) and the Dutch RD system (EPSG:28992) in JavaScript.

I use Proj4js for this. When adding the definition from spatialreference.org I noticed a difference with the definition that is embedded in my PostGIS database:

// Source: PostGIS SRID 28992 from database
"+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs"

// Source: http://spatialreference.org/ref/epsg/amersfoort-rd-new/proj4js/
"+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"

The difference being +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 that is present in the PostGIS definition but not in the spatialreference.org definition.

Is this a meaningful difference? If so, what does this part of the string define?

3

Yes, it is a meaningful difference, there will be some difference in reprojecting. Those 7 parameters define a datum shift (translation + rotation + scaling).

If the postgis reprojection is better than the other one, just add those parameters to the Proj4js definition.

You can find additional information on the towgs84 param here https://trac.osgeo.org/proj/wiki/GenParms#towgs84-DatumtransformationtoWGS84

  • 1
    The postgis projection is better, the official EPSG reference is wrong (produces 200 meter shift). Here is a good post about it: oegeo.wordpress.com/2008/05/20/… – tilt Feb 10 '16 at 10:11
  • 2
    @tilt EPSG only started publishing WKT strings with v2 last year. EPSG is also "late-binding." Transformation information is not linked to a CRS definition but chosen when needed. – mkennedy Feb 10 '16 at 17:39
  • That is interesting information @mkennedy, thanks. Do you happen to have a link for more info on that? – tilt Feb 11 '16 at 9:10
  • Also thanks @tilt, that is exactly what I did (used the projection from PostGIS in Proj4js by adding it). – dyve Feb 11 '16 at 9:15
  • EPSG Geodetic Parameter Registry and the main website (look for guidance notes). Note: I help maintain it. – mkennedy Feb 11 '16 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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