Hi
 
I'm creating a web page where the user enters a point (Longitude & Latitude) and
a distance in KM (Either 0 - 5)
I need to return from the Postgis Database all the polygone(s) within the set
distanance of seid point. and return attributs from another table
 
so this is kind of what i've come up with
 
select a.coll_a,a,coll_b,p.coll_a from attributes a,polys p where a.coll_a =
p.coll_a and ST_DWithin(p.the_geom, ST_GeomFromText('POINT(MyPoint)'4326), D) 
 
where MyPoint is theLongitude & Latitude entered and D the distance * 1000
 
A will this work?

is there a simpler way?
 
btw the polygone SRID is also 4326 (WGS84)
 
Thanx

 
Tony

The future has a bearing on the past but did the past take into account the
future
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to