mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Discard empty segments
This commit is contained in:
parent
1033ca2840
commit
e1e0392917
@ -307,6 +307,8 @@ bool RGNFile::polyObjects(Handle &hdl, const SubDiv *subdiv,
|
|||||||
if (!stream.init(bitstreamInfo, labelPtr & 0x400000, false))
|
if (!stream.init(bitstreamInfo, labelPtr & 0x400000, false))
|
||||||
return false;
|
return false;
|
||||||
while (stream.readNext(lonDelta, latDelta)) {
|
while (stream.readNext(lonDelta, latDelta)) {
|
||||||
|
if (!(lonDelta || latDelta))
|
||||||
|
continue;
|
||||||
pos.rx() += LS(lonDelta, (24-subdiv->bits()));
|
pos.rx() += LS(lonDelta, (24-subdiv->bits()));
|
||||||
if (pos.rx() >= 0x800000 && subdiv->lon() >= 0)
|
if (pos.rx() >= 0x800000 && subdiv->lon() >= 0)
|
||||||
pos.rx() = 0x7fffff;
|
pos.rx() = 0x7fffff;
|
||||||
@ -416,6 +418,8 @@ bool RGNFile::extPolyObjects(Handle &hdl, const SubDiv *subdiv, quint32 shift,
|
|||||||
if (!stream.init(bitstreamInfo, false, true))
|
if (!stream.init(bitstreamInfo, false, true))
|
||||||
return false;
|
return false;
|
||||||
while (stream.readNext(lonDelta, latDelta)) {
|
while (stream.readNext(lonDelta, latDelta)) {
|
||||||
|
if (!(lonDelta || latDelta))
|
||||||
|
continue;
|
||||||
pos.rx() += LS(lonDelta, 24-subdiv->bits());
|
pos.rx() += LS(lonDelta, 24-subdiv->bits());
|
||||||
if (pos.rx() >= 0x800000 && subdiv->lon() >= 0)
|
if (pos.rx() >= 0x800000 && subdiv->lon() >= 0)
|
||||||
pos.rx() = 0x7fffff;
|
pos.rx() = 0x7fffff;
|
||||||
|
Loading…
Reference in New Issue
Block a user