Closed augustjd closed 8 years ago
Yes, you're right. I just added a test and a quickfix in https://github.com/tkrajina/gpxpy/tree/zero-latlng but I need more testing before merging that in master. Can you try if that branch work properly with your test cases?
That solves it! Thanks.
I was writing some test cases where a GPX file was written and then read from disk, so I presumed 0,0 would be a safe pair of coordinates to use, but it raised an exception:
The latitude/longitudes were not written to the file if they were equal to 0. I'm going to guess that some bit of code in the serialization step is using
if not latitude:
when it should beif latitude is None:
, or, perhaps more generallyif attribute.value: write_attribute(attribute)
instead ofif attribute.value is not None: write_attribute(attribute)