[postgis-users] Transform Coordinates
Jean David TECHER
david.techer at davidgis.fr
Wed Nov 12 12:57:15 PST 2008
Quoting lisek lichu <lisek.lichu at gmail.com>:
> You can also add new column in Your table
>
> SELECT
> AddGeometryColumn('','table_name','new_column_name','new_SRID','POINT',2);
>
> after that jst do:
>
> UPDATE table_name set new_column_name = Transform(old_geom_column,new_SRID);
>
> after that query You will have 2 columnt: first with old SRID ald second
> with new SRID so You can just DROP old column.
>
-- cut --
Dropping is correct but...
I advise you to use dropgeometrycolumn instead because dropping the
old colimn will not drop the new reference tuple in geometrycomuns
select DropGeometryColumn('table_name','old_geom_column');
is available too :)
and will drop the tuple in geomtrycolumns.
It is important for GIS tools like QGIS and MapServer that use
geometry_columns table...These tools implements the following query
' select srid ??? from geometry_column where f_table='???''
So imagine what happen if the drop column does not exist???
--david;
> Simon
>
===================
Jean David TECHER
www.davidgis.fr
06 60 46 85 05
04 99 77 16 87
===================
More information about the postgis-users
mailing list