[postgis-users] Projection...

Nicolas Ribot nicky666 at gmail.com
Thu Sep 22 07:36:22 PDT 2005


> Hi,
>
> I have some data from USA in 'NAD83 Nevada East' fromat (EPSG:32107 -
> ?). I want to change it to WGS84 (EPSG:4326) using PostGIS. When I use:
>
> "select updategeometrysrid('table', 'the_geom', 4326);" resulting values
> are'nt correct. What am I doing wrong?
>
> Thanks in advance for your replies.
>
> Best regards
> Wacek
>

Hi Wacek,

calling updategeometrysrid only changes the internal geometries SRID.
It does not reproject them.
You have to explicitly transform the geometries from the source
coordinates system to the target one, using the tranform() function.

select transform(the_geom, 4326) from table;

You can either create a new table containing the transformed
geometries, or drop SRID constraint on your table, transform the
geometries and re-add the SRID constraint adapted to the new
geometries' SRID

Nicolas



More information about the postgis-users mailing list