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 openlayer map (through the OpenLayers plugin) it is off by a few hundred meters.
Then i converted it to 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?