Dear all,
I have two questions to ask: Q1: I have a table that has one geometry column and I want to calculate distance (in Km) between two geometries which is in one column. I am using select query as under, and wanted to know if this is the right way of doing distance calculation between two points. Since, both the points are in one table but in different rows so I am using select statement to pick the geom from each row. select st_distance_sphere((select the_geom from table_name where place_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 based on some distance and direction. Such that new geometry is at “42km E of some reference geometry”. Is there a function that can do this? Or if someone can point me to a specific link.. Thanks, YJ
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
