merge the two dWithin methods to one for postgis/geom support