forked from organicmaps/organicmaps
Rename field lng -> lon
This commit is contained in:
parent
fbd229259c
commit
67e3b6a426
4 changed files with 8 additions and 8 deletions
|
@ -27,9 +27,9 @@ protected:
|
|||
|
||||
// convert to mercator
|
||||
p->lat = MercatorBounds::LatToY(p->lat);
|
||||
p->lng = MercatorBounds::LonToX(p->lng);
|
||||
p->lon = MercatorBounds::LonToX(p->lon);
|
||||
|
||||
m_holder.AddNode(p->id, p->lat, p->lng);
|
||||
m_holder.AddNode(p->id, p->lat, p->lon);
|
||||
}
|
||||
else if (p->tagKey == XMLElement::ET_WAY)
|
||||
{
|
||||
|
|
|
@ -426,7 +426,7 @@ void BuildFeaturesFromO5M(SourceReader & stream, BaseOSMParser & parser)
|
|||
{
|
||||
p.tagKey = XMLElement::ET_NODE;
|
||||
p.lat = DECODE_O5M_COORD(em.lat);
|
||||
p.lng = DECODE_O5M_COORD(em.lon);
|
||||
p.lon = DECODE_O5M_COORD(em.lon);
|
||||
break;
|
||||
}
|
||||
case TType::Way:
|
||||
|
|
|
@ -44,7 +44,7 @@ string XMLElement::ToString(string const & shift) const
|
|||
switch (tagKey)
|
||||
{
|
||||
case ET_NODE:
|
||||
ss << "Node: " << id << " (" << fixed << setw(7) << lat << ", " << lng << ")";
|
||||
ss << "Node: " << id << " (" << fixed << setw(7) << lat << ", " << lon << ")";
|
||||
break;
|
||||
case ET_ND:
|
||||
ss << "Nd ref: " << ref;
|
||||
|
@ -89,7 +89,7 @@ void BaseOSMParser::AddAttr(string const & key, string const & value)
|
|||
if (key == "id")
|
||||
CHECK ( strings::to_uint64(value, m_current->id), ("Unknown element with invalid id : ", value) );
|
||||
else if (key == "lon")
|
||||
CHECK ( strings::to_double(value, m_current->lng), ("Bad node lon : ", value) );
|
||||
CHECK ( strings::to_double(value, m_current->lon), ("Bad node lon : ", value) );
|
||||
else if (key == "lat")
|
||||
CHECK ( strings::to_double(value, m_current->lat), ("Bad node lat : ", value) );
|
||||
else if (key == "ref")
|
||||
|
|
|
@ -27,7 +27,7 @@ struct XMLElement
|
|||
|
||||
ETag tagKey = ET_UNKNOWN;
|
||||
uint64_t id = 0;
|
||||
double lng = 0;
|
||||
double lon = 0;
|
||||
double lat = 0;
|
||||
uint64_t ref = 0;
|
||||
string k;
|
||||
|
@ -41,7 +41,7 @@ struct XMLElement
|
|||
{
|
||||
tagKey = ET_UNKNOWN;
|
||||
id = 0;
|
||||
lng = 0;
|
||||
lon = 0;
|
||||
lat = 0;
|
||||
ref = 0;
|
||||
k.clear();
|
||||
|
@ -59,7 +59,7 @@ struct XMLElement
|
|||
return (
|
||||
tagKey == e.tagKey
|
||||
&& id == e.id
|
||||
&& my::AlmostEqualAbs(lng, e.lng, 1e-7)
|
||||
&& my::AlmostEqualAbs(lon, e.lon, 1e-7)
|
||||
&& my::AlmostEqualAbs(lat, e.lat, 1e-7)
|
||||
&& ref == e.ref
|
||||
&& k == e.k
|
||||
|
|
Loading…
Add table
Reference in a new issue