I am showing postgis data with srid 28992 (Amersfoort / RD New). But when I plot the geospatial data on a map (with openlayers plugin), the data is shown a hunderd meters off because the datum shift is not taken into account.
When I make a custom CRS with the correct datum shift and set my layer to that CRS is it shown correctly.
I want to update QGis' standard interpretation of 28992 so it takes into account this datum shift (+towgs84 parameter) correctly and when I open new data it is shown correctly immediately.
I found that QGis has a sqlite db called srs.db in /usr/share/qgis/resources/. But even when I update the record for 28992 it still doesn't show the data correct on the map. When I inspect the layer in QGis I see it still has no +towgs84 parameter.
Does this mean that QGis does not actually use this sqlite db? Because the data I show is from a postgresql database I also edited spatial_ref_sys.sql to make sure that it also knows about the datum shift.
I also edited the epsg en esri files in /usr/share/proj/ just to be sure, but no effect.
At this moment I cannot think of another place where QGis gets its projection information from.
Best Answer
Are you sure that your Postgis and QGIS share the same +towgs84 parameters?
My QGIS 2.0.1 Dufour comes with this definition:
while my PostgreSQL has this stored in table spatial_ref_sys
If your QGIS has another proj definition for EPSG:28992, your installation might be broken. Have a look at the setup log if postinstall was broken somewhere.
One other point: Postgis uses this string for the WKT definition:
which references to Amersfoort datum, but no +towgs84 are stored for that. I am not sure if QGIS therefore sets +towgs84 to zero, instead of using its own EPSG values, or those from the Postgis proj4 string.
QGIS writes this .qpj output: