[postgis-users] Problems with MakePoint

jrom jerome.gasperi at gmail.com
Mon Jun 4 03:57:23 PDT 2007


Hi Gus,

You should force the point SRID to be the same as your column SRID.
So you should try something like this :

update montouto2000 set the_geom=setSRID(MakePoint(x,y), 23029);

Hope this help

On 6/4/07, Gustavo Ces <g.ces at pettra.es> wrote:
>
>
> Hi all,
>
>     i´m trying to makepoints from coordinate data ( x and y column) in one
> table( montouto2000). This is what i do..
>
>
> SELECT AddGeometryColumn('public', 'montouto2000', 'the_geom', 23029,
> 'POINT', 2)
> update montouto2000 set the_geom=MakePoint(x,y)
>
> and Postgis says...
>
> ERROR: new row for relation "montouto2000" violates check constraint
> "enforce_srid_the_geom"
> Estado SQL:23514
>
> I´ve got two questions:
> 1. What is the column dimension? i try to set it as 0 (poinst are  no
> dimension geometries) but it says there´s a problem with the dim constraint,
> so i supose dimesion=number of coordinates? I don´t know, please, help.
> 2. What happens with SRID? why does PostGis Scream?
>
>
> Thanks in advance,
>
> Gus
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>


-- 
J.
http://geogurus.org/jrom



More information about the postgis-users mailing list