I have a table with a geospatial column with srid 28992 but noticed that if I try to show it in QGIS (v1.9) on any OpenLayers map (through the OpenLayers plugin) it is off by a few hundred meters.
Then I converted it to epsg:900913 (remembering something that with an old plugin this projection was required) and then it is shown on the correct spot.
However when I look in the metadata of this layer in QGIS (right-click -> Properties -> Metadata) everything is blank and when I do Zoom to Layer Extent the map jumps to water near Africa (suggesting it doesn't understand the projection).
Somehow the metadata gets lost to QGIS during my manual conversion. The script I use for the manual conversion is:
alter table <table_name> drop constraint "enforce_srid_<column_name>"; update <table_name> set <column_name> = ST_Transform(<column_name>,900913); alter table <table_name> add constraint "enforce_srid_<column_name>" CHECK (st_srid(<column_name>) = 900913); update geometry_columns set srid=900913 where f_geometry_column = '<column_name>';
The result of this seems no different (except that now I have an extra column) than if I use:
SELECT AddGeometryColumn('<table_name>','<new_column_name>',900913, 'LINESTRING', 2); UPDATE <table_name> SET <new_column_name> = ST_Transform(<column_name>,900913);
Does any of you know what god particle I am looking for?