-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 [BUG] Fix gpx and kml parsing: geom is an empty GeometryCollection …
…after invalid MultiLineString merge
- Loading branch information
1 parent
8df192f
commit b40a095
Showing
5 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
geotrek/trekking/tests/data/apidae_trek_parser/trace_with_only_two_duplicate_coordinates.kml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1" ?> | ||
<kml xmlns="http://earth.google.com/kml/2.0"> | ||
<Document> | ||
<name>A test trace in KML format</name> | ||
<Style id="roadStyle"> | ||
<LineStyle> | ||
<color>9F0000FF</color> | ||
<width>4</width> | ||
</LineStyle> | ||
|
||
</Style> | ||
<Placemark> | ||
<name>A trace for my test trek</name> | ||
<LookAt> | ||
<longitude>6.51847</longitude> | ||
<latitude>45.80873</latitude> | ||
</LookAt> | ||
<Point> | ||
<coordinates>6.51847,45.80873,0</coordinates> | ||
</Point> | ||
</Placemark> | ||
<Placemark> | ||
<name>route</name> | ||
<styleUrl>#roadStyle</styleUrl> | ||
<MultiGeometry> | ||
<LineString> | ||
<coordinates>6.51847,45.80873,0 6.51847,45.80873,0 | ||
</coordinates> | ||
</LineString> | ||
</MultiGeometry> | ||
</Placemark> | ||
</Document> | ||
</kml> |
15 changes: 15 additions & 0 deletions
15
...rek/trekking/tests/data/apidae_trek_parser/trace_with_only_two_duplicate_track_points.gpx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<gpx version="1.1" creator="GDAL 3.3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://www.topografix.com/GPX/1/1" | ||
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"> | ||
|
||
<trk> | ||
<trkseg> | ||
<trkpt lat="45.660127" lon="4.987793"> | ||
</trkpt> | ||
<trkpt lat="45.660127" lon="4.987793"> | ||
</trkpt> | ||
</trkseg> | ||
</trk> | ||
|
||
</gpx> |