1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-08 11:13:02 +02:00

Compare commits

..

No commits in common. "70f0e8982b597f2142f13c940e4743344875a563" and "36220dbc9c401e88db54a138e2f2935c13702a7a" have entirely different histories.

2 changed files with 7 additions and 7 deletions

View File

@ -312,13 +312,14 @@ Label LBLFile::label(Handle &hdl, quint32 offset, bool poi, bool capitalize,
if (!(_poiSize >= (offset << _poiMultiplier) if (!(_poiSize >= (offset << _poiMultiplier)
&& seek(hdl, _poiOffset + (offset << _poiMultiplier)) && seek(hdl, _poiOffset + (offset << _poiMultiplier))
&& readUInt24(hdl, poiOffset) && (poiOffset & 0x3FFFFF))) && readUInt24(hdl, poiOffset) && (poiOffset & 0x3FFFFF)))
return Label(); return QString();
labelOffset = _offset + ((poiOffset & 0x3FFFFF) << _multiplier); labelOffset = _offset + ((poiOffset & 0x3FFFFF) << _multiplier);
} else } else
labelOffset = _offset + (offset << _multiplier); labelOffset = _offset + (offset << _multiplier);
if (labelOffset > _offset + _size) if (labelOffset > _offset + _size)
return Label(); return QString();
if (!seek(hdl, labelOffset)) if (!seek(hdl, labelOffset))
return Label(); return Label();

View File

@ -18,7 +18,7 @@ static quint64 pointId(const QPoint &pos, quint32 type, quint32 labelPtr)
quint64 id; quint64 id;
uint hash = (uint)qHash(QPair<uint,uint>((uint)qHash( uint hash = (uint)qHash(QPair<uint,uint>((uint)qHash(
QPair<int, int>(pos.x(), pos.y())), labelPtr)); QPair<int, int>(pos.x(), pos.y())), labelPtr & 0x3FFFFF));
id = ((quint64)type)<<32 | hash; id = ((quint64)type)<<32 | hash;
// Make country labels precedent over city labels // Make country labels precedent over city labels
if (!Style::isCountry(type)) if (!Style::isCountry(type))
@ -451,7 +451,7 @@ bool RGNFile::extPointObjects(Handle &hdl, const SubDiv *subdiv,
if (_pointsGblFlags && !skipGblFields(hdl, _pointsGblFlags)) if (_pointsGblFlags && !skipGblFields(hdl, _pointsGblFlags))
return false; return false;
QPoint p(subdiv->lon() + LS(lon, 24-subdiv->bits()), QPoint pos(subdiv->lon() + LS(lon, 24-subdiv->bits()),
subdiv->lat() + LS(lat, 24-subdiv->bits())); subdiv->lat() + LS(lat, 24-subdiv->bits()));
// Discard NT points breaking style draw order logic (and causing huge // Discard NT points breaking style draw order logic (and causing huge
@ -459,9 +459,8 @@ bool RGNFile::extPointObjects(Handle &hdl, const SubDiv *subdiv,
if (point.type == 0x11400) if (point.type == 0x11400)
continue; continue;
point.coordinates = Coordinates(toWGS24(p.x()), toWGS24(p.y())); point.coordinates = Coordinates(toWGS24(pos.x()), toWGS24(pos.y()));
point.id = pointId(p, point.type, point.classLabel ? pos(hdl) point.id = pointId(pos, point.type, labelPtr & 0x3FFFFF);
: labelPtr & 0x3FFFFF);
if (lbl && (labelPtr & 0x3FFFFF)) if (lbl && (labelPtr & 0x3FFFFF))
point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF); point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);