[postgis-users] generating new point geometry
Yamini Singh
yaminijsingh at live.com
Thu Sep 15 08:18:55 PDT 2011
Hi All,
I have two questions to ask:Q1: I have a table that has one geometry column and I want to calculatedistance (in Km) between two geometries which is in one column. I am usingselect query as under, and wanted to know if this is the right way of doingdistance calculation between two points. Since, both the points are in onetable but in different rows so I am using select statement to pick the geom fromeach row.select st_distance_sphere((select the_geom from table_name whereplace_name='PL1'), (select the_geom from table_name where place_name='PL2'))/1000;Q2: I have a table that has columns distance, direction, place_name and geometry (with SRID 4326) as under._________________________________________________________| Id | distance | direction | Place_name | geom |--------------------------------------------------------| 1 | 42 km | E | PL1 | some geometry|---------------------------------------------------------Now I want to calculate new geometry with reference to given geometry basedon some distance and direction. Such that new geometry is at ?42km E of somereference geometry?. Is there a function that can do this? Or if someone canpoint me to a specific link..Looking forward..Thanks,YJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110915/0f34e0a4/attachment.html>
More information about the postgis-users
mailing list