[postgis-users] Nearby result set ordered by proximity
sterini at gmail.com
Sat May 8 19:32:05 PDT 2010
Actually, I figured it out...
ORDER BY ST_Distance(location,
Unless there is a better way?
On Sat, May 8, 2010 at 8:40 PM, Ilya Sterin <sterini at gmail.com> wrote:
> 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 the
> result set in order of proximity to location.
More information about the postgis-users