Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

old mapsource does not understand <bounds ...></bounds> #186

Closed
wrohdewald opened this issue Dec 21, 2019 · 4 comments
Closed

old mapsource does not understand <bounds ...></bounds> #186

wrohdewald opened this issue Dec 21, 2019 · 4 comments

Comments

@wrohdewald
Copy link
Contributor

it just refuses to load the gpx file, no reason given.

Mapsource only understands <bounds ... />

I believe this should always be correct syntax, so this change should not do any harm. But it makes the output a bit shorter.

@tkrajina
Copy link
Owner

tkrajina commented Dec 26, 2019

OK, try the following

make analyze-xsd

it will download the xsd files in xsd/.

And then install xmllib, download your gpx file and try one of:

xmllint --noout --schema xsd/gpx1.0.xsd your_gpx.gpx
xmllint --noout --schema xsd/gpx1.1.xsd your_gpx.gpx

(depending on the gpx version).

@wrohdewald
Copy link
Contributor Author

How would that help?

Let me rephrase my problem:

AFAIK, both those variants are legal:

<bounds minlat="53.5" maxlat="53.6" minlon="9.5" maxlon="9.6" ></bounds>
<bounds minlat="53.5" maxlat="53.6" minlon="9.5" maxlon="9.6" />

Gpxpy.to_xml() creates the first variant, Mapsource only understands the second variant. I know a lot of people still use Mapsource.

@tkrajina
Copy link
Owner

You said "I believe", I wanted to be sure that the problem is not the generated GPX. It's quite possible that gpxpy generates an invalid XML file. And, mapsource being a popular app -- I thought maybe the problem is in the GPX file. If that's not the case, I agree with you, but it's also not a bug in another application. And here, it's not a bug, it's a feature request.

Anyway, I did try to fix this in empty-tags, but some tests are still failing. I'll probably finish it after I merge the current dev branch in master and release the next version.

@tkrajina
Copy link
Owner

tkrajina commented Feb 9, 2022

A fix for this is now in the latest dev branch (will be included in the next version).

@tkrajina tkrajina closed this as completed Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants