Find things near a point SELECT gid,townlands, distance(the_geom, GeomFromText( POINT(317431.0 231704.0) ,29900)) FROM dublin_historical WHERE st_dwithin(the_geom, GeomFromText( POINT(317431.0 231704.0) ,29900),500) ORDER BY distance(the_geom, GeomFromText( POINT(317431.0 231704.0) ,29900)) LIMIT 100;