MCPcopy Create free account
hub / github.com/comaps/comaps / ScoreLatLon

Function ScoreLatLon

libs/editor/feature_matcher.cpp:73–78  ·  view source on GitHub ↗

Returns value form (-Inf, 1]. Negative values are used as penalty, positive as score.

Source from the content-addressed store, hash-verified

71
72/// Returns value form (-Inf, 1]. Negative values are used as penalty, positive as score.
73double ScoreLatLon(XMLFeature const & xmlFt, ms::LatLon const & latLon)
74{
75 auto const a = mercator::FromLatLon(xmlFt.GetCenter());
76 auto const b = mercator::FromLatLon(latLon);
77 return 1.0 - (a.Length(b) / kPointDiffEps);
78}
79
80void ForEachRefInWay(pugi::xml_document const & osmResponse, pugi::xml_node const & way, ForEachRefFn const & fn)
81{

Callers 1

GetBestOsmNodeFunction · 0.85

Calls 3

FromLatLonFunction · 0.50
GetCenterMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected