-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow filling in a default "creator" value to work around invalid GPX files from legacy IHM #23
Comments
Wouldn't XSD validation fail for such files? |
It might be that .Net conversion from xsd to cs class doesn't obey the |
Well, seems like I was naive to think that a generated class would be used to validate an xml :-) |
The GPX schema documentation has this to say about
I can improve the error message to help figure out what's wrong when there is some sort of a failure, but I do want this to throw Perhaps |
This would help, of course. I have asked the users who opened the issue where they got the files from, I hope they'll respond, and I hope someone at the other end is willing to change their code. |
No, but there's a limit to how much hand-holding makes sense before the answer has to be "fix your data before uploading it". In those cases (and this one, at least for now), one thing you can do is catch specifically |
Well, seems I can only blame myself - the files where created by my code :-((( in a special scenario I forgot to add creator to the file. |
Thanks! let me know when a new package is available. |
@HarelM 0.3.0 is up on NuGet now. |
Thanks a lot for all the hard work! keep it up. I have published this change to my production site. |
The world isn't perfect :-)
Following on some user feedback I got after publishing this to production.
The following error is a bit cryptic assuming the GPX version is 1.1.
NetTopologySuite.IO.GPX/src/NetTopologySuite.IO.GPX/GpxReader.cs
Line 119 in 83d9e57
You'll be able to get some examples from users in the issue they opened:
IsraelHikingMap/Site#794
The problem is that creator is empty in these files.
I'm not sure how they got these files, but preventing opening a file because the creator field does not exist seems too rigid apparently...
The text was updated successfully, but these errors were encountered: