[postgis-users] ST_SetSRID

Rebecca Clarke r.clarke83 at gmail.com
Thu Feb 21 02:58:20 PST 2013


Hi Laurent

When I run this

SELECT st_srid( st_transform(rast, 4326))  FROM table;

this returns 4326

So if your creating a table, you'd do:

Create table newtable as select rast, st_transform(rast,4326) as new_rast
from bd_ortho

then if you run

select st_srid(rast), st_srid(new_rast) from newtable

this should return :

2154, 4326



Rebecca



On Thu, Feb 21, 2013 at 10:36 AM, laurent
<lcelati at latitude-geosystems.com>wrote:

> Hello,
> --------------------------------------
> SELECT postgis_full_version()
>
> "POSTGIS="2.0.0 r9605" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March
> 2012" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8"
> LIBJSON="UNKNOWN" RASTER"
> ---------------------------------------
>
> Yes, yesterday i tried to do a reprojection thanks to st_transform & to do
> a
> ST_SetSRID in order to update metadata but eventually I do not think I
> succeeded.
>
> Could you tell me the SQL query please? I thought that following queries
> are
> valid :
>
> SELECT rast As bd_ortho, ST_Transform(rast,4326) As bd_ortho_wgs84
>
> But i have today an error message saying :
>
> ERREUR:  la colonne « rast » n'existe pas
> LINE 1: SELECT rast As bd_ortho, ST_Transform(rast,4326) As bd_ortho...
>
> Once I'm sure I reprojected this layer, I will try to update the metadata
>
>
> Thank you to throw light for me.
>
> Regards.
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://postgis.17.n6.nabble.com/ST-SetSRID-tp5002645p5002650.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130221/3a87e713/attachment.html>


More information about the postgis-users mailing list