Hi I have a java program which I want to query my PostGIS databaes and return those nodes that are a certain distance from a given centre point. I am not sure how to pass the centre point into the query. I have the following so far:
How could I pass the PostGis Point object in properly? Also, when I am defining the distance from the centre point. Can I simply do a Thanks asked 03 Dec '12, 16:30 srose |
Use ST_GeomFromText: Example: select st_geomfromtext('point(-23.4 -46.2)'::text, 93426); -- Lat/Lon/SRID I would say that, unless some other optimizations are made, that this way of querying the database would - most likely - be VERY slow. See: ST_Distance and ST_GeomFromText answered 22 Dec '12, 22:13 MCPicoli |