[postgis-users] How to change the SRID of a table in geometry_columns view

fLaNsch at gmx.de fLaNsch at gmx.de
Fri Sep 14 01:59:18 PDT 2012


Hi Stef, 

try this:

select updategeometrysrid('your_table', 'geom', 25832);

hf
Simon


-------- Original-Nachricht --------
> Datum: Fri, 14 Sep 2012 10:03:58 +0200
> Von: Nicolas Ribot <nicolas.ribot at gmail.com>
> An: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> Betreff: Re: [postgis-users] How to change the SRID of a table in geometry_columns view

> Hi,
> 
> This is now possible thanks to the typemods, by altering the column:
> 
> alter table mytable
> ALTER COLUMN geom TYPE geometry(MultiPolygon,2154) USING ST_setSRID(geom,
> 2154);
> 
> (replacing the type by the one of the geom column)
> 
> Nicolas
> 
> On 14 September 2012 09:36, Stefan Schwarzer <stefan.schwarzer at unep.org>
> wrote:
> > Hi there,
> >
> > I'd need to change the SRID of a table, as it is "0" in the moment, and
> should be something else. I searched around, but couldn't really find clear
> guidance on how to do this with Postgis 2.x, as the "geometry_columns" is
> now a view and not anymore a table.
> >
> > I guess there is a simple SQL for that? A UpdateGeometrySRID or so?
> >
> > Thanks for any hints,
> >
> > Stef
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list