SELECT * from myTable order by mapid, ST_Distance(the_geom, 'POINT(Xcoord, Ycood)'::geometry);
HTH Nicklas On Thu, 2011-01-20 at 08:38 +0000, Malm Paul wrote: > Hi, > I wonder how I can order a result depending on two arguments. > First:mapid (objects are connected to a mapid) and > second:within the mapid-sorted objects they should be sorted on the > distance to a certain coordinate. > > Thanks, > Paul > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
