1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 06:43:22 +02:00

Discard empty segments

This commit is contained in:
Martin Tůma 2023-10-22 20:42:05 +02:00
parent 1033ca2840
commit e1e0392917

View File

@ -307,6 +307,8 @@ bool RGNFile::polyObjects(Handle &hdl, const SubDiv *subdiv,
if (!stream.init(bitstreamInfo, labelPtr & 0x400000, false))
return false;
while (stream.readNext(lonDelta, latDelta)) {
if (!(lonDelta || latDelta))
continue;
pos.rx() += LS(lonDelta, (24-subdiv->bits()));
if (pos.rx() >= 0x800000 && subdiv->lon() >= 0)
pos.rx() = 0x7fffff;
@ -416,6 +418,8 @@ bool RGNFile::extPolyObjects(Handle &hdl, const SubDiv *subdiv, quint32 shift,
if (!stream.init(bitstreamInfo, false, true))
return false;
while (stream.readNext(lonDelta, latDelta)) {
if (!(lonDelta || latDelta))
continue;
pos.rx() += LS(lonDelta, 24-subdiv->bits());
if (pos.rx() >= 0x800000 && subdiv->lon() >= 0)
pos.rx() = 0x7fffff;