I 'm playing with a variation of the st_translate function we were discussing last week.

I have created two boxes (spatial_ref) and I wish to place an entity (graphics.process_dgm) into the temp_ table with the coordinates that centers the entity in a specific one of these boxes.

Here's the code that I have come up with but so far it produces 0 rows.

Insert into temp_ (the_geom)
Select st_translate(st_translate (graphics.process_dgm.the_geom,
st_y (st_centroid(graphics.process_dgm.the_geom)) - st_x (st_centroid (spatial_ref.the_geom)), st_y (st_centroid(graphics.process_dgm.the_geom)) - st_y (st_centroid (spatial_ref.the_geom))), ( st_xmax(graphics.process_dgm.the_geom) - st_xmin(graphics.process_dgm.the_geom)), ( st_ymax(graphics.process_dgm.the_geom) - st_ymin(graphics.process_dgm.the_geom)))
from graphics.process_dgm, spatial_ref, temp_
where graphics.process_dgm.description = 'Tank'
and spatial_ref.position_ = '2';


Thoughts will be appreciated.

Bob
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to