This is a follow up from a previous question, where we commented that using euclidian distances with lat,long coordinates does not yeld correct results. I read in the documentat
The default earth model is SphericalVincentyEarthModel
, which is supposedly a bit faster (but assumes a spherical earth, instead of a spheroid); but this should not make much of a difference unless you need precision to the meter: the maximum error should be 0.3% of the distance, according to this answer.
To set the earth model parameter, use EarthModel.MODEL_ID
as option ID. (As referenced by the Parameterizer of LngLatDistanceFunction
). When trying to find the appropriate option ID, always have a look at the Parameterizers - we are slowly moving all the option IDs into the Parameterizers.