[postgis-users] Insert transformed coordinates

Charlton Purvis cplist at secondcreek.org
Fri Jun 8 14:43:22 PDT 2007


Gary, 

>       SELECT INTO transCoord X(SubSel.transformed_geom),
> Y(SubSel.transformed_geom) FROM (

That part of the select into looks suspicious to me.  Have you tried
selecting into plain variables?

declare
...
  my_x float;
  my_y float;

...

select into my_x, my_y X(SubSel.transformed_geom),
Y(SubSel.transformed_geom) FROM (
        SELECT SetSRID(

... 

INSERT INTO
vts_route_stops(stop_number,stop_description,stop_latitude,stop_longitude)
VALUES(stopnum,stopdes,my_y,my_x);

I think that will work.  I might be off in the syntax above, but what looks
weird is the way you're selecting into components of a record set.

Charlton





More information about the postgis-users mailing list