Would something like this be inefficient? I store data in a geometry
type, as I don't really care about the spheroid accuracy, as my
location queries are mostly less than 30 km apart. So...
SELECT ST_AsGeoJSON(location), title, description
FROM event
WHERE ST_DWithin(location::geography,
I can't seem to figure out how I'd order a nearby result set by proximity.
SELECT ST_AsGeoJSON(location), title, description
FROM event
WHERE ST_DWithin(location::geography,
ST_GeogFromText('POINT(-82.914349 42.391138)'),4000);
Above searches for everything in the vicinity of 40 km, but I want
Actually, I figured it out...
ORDER BY ST_Distance(location,
ST_GeomFromText('SRID=4326;POINT(-83.359752 42.5212687)'))
Unless there is a better way?
Ilya
On Sat, May 8, 2010 at 8:40 PM, Ilya Sterin ster...@gmail.com wrote:
I can't seem to figure out how I'd order a nearby result set