Given latitude and longitide of two points I have to find if them are withing a given max distance in meter, I found this function: https://postgis.net/docs/ST_DWithin.html
and I am using it in this way:
ST_DWithin(st_point(:long1, :lat1)::geography, st_point(:long2, :lat2)::geography, :max_distance))
max_distance is an int.
Is this correct ?
This implies that I have use_spheroid = true, what does this parameter change between true/false ?
geographyor the index is onGeography(geom)https://gis.stackexchange.com/questions/247113/setting-up-indexes-for-postgis-distance-queries/247131#247131 – Vince Oct 19 '22 at 16:07