hholzgra / ocitysmap

Fork of ocitysmap repository at savannah.nongnu.org
Other
35 stars 12 forks source link

GPX rendering fails on empty <rte/> sections #35

Closed hholzgra closed 2 years ago

hholzgra commented 2 years ago

The GPX rendering code checks the count of routes found in a GPX file, and only creates a route layer if the count is non-zero.

There are GPX files that only contain an empty tag. This is counted as a valid, though empty, route by the Python gpxparse library, but leads to a

Cannot determine extent for layer 'routes'

error being thrown by the OGR plugin.

So the code that determines whether the route layer should be enabled for a given GPX file should check for the count of non-empty routes being non-zero, not just for the total route count.