-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3410 from GeotrekCE/impr-apidae-trek-parser
💫 Various improvements for the APIDAE trek parser
- Loading branch information
Showing
11 changed files
with
262 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?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.51951,45.80845,0 6.52006,45.80845,0 6.52025,45.8081,0 | ||
6.52135,45.80823,0 6.52302,45.80824,0 6.52391,45.80807,0 6.52423,45.80782,0 6.52498,45.80745,0 | ||
6.52543,45.8073,0 6.52576,45.80714,0 6.52663,45.80682,0 6.527,45.8067,0 6.52755,45.80661,0 | ||
6.52811,45.80627,0 6.52837,45.80598,0 6.52927,45.8056,0 6.53037,45.80508,0 6.53074,45.80463,0 | ||
6.5317,45.8046,0 6.53202,45.80476,0 6.53295,45.80513,0 6.53267,45.80549,0 6.53168,45.80681,0 | ||
6.53088,45.80801,0 6.53041,45.80841,0 6.53049,45.80898,0 6.5306,45.80925,0 6.53169,45.81012,0 | ||
6.53268,45.81048,0 6.53422,45.81124,0 6.53541,45.81172,0 6.53551,45.81191,0 6.53585,45.81226,0 | ||
6.53672,45.81271,0 6.53709,45.81267,0 6.53769,45.81285,0 6.53772,45.81319,0 6.53764,45.81339,0 | ||
6.53709,45.81315,0 6.53627,45.81327,0 6.53543,45.81332,0 6.53458,45.81311,0 6.53409,45.81281,0 | ||
6.53314,45.8125,0 6.53231,45.81216,0 6.53161,45.81192,0 6.53058,45.81181,0 6.52993,45.81184,0 | ||
6.52865,45.81212,0 6.52885,45.81227,0 6.52889,45.81248,0 6.52823,45.81268,0 6.52652,45.81266,0 | ||
6.52548,45.81239,0 6.52347,45.81166,0 6.52269,45.81117,0 6.52196,45.81094,0 6.52076,45.81031,0 | ||
6.51953,45.80958,0 6.51849,45.80888,0 | ||
</coordinates> | ||
</LineString> | ||
</MultiGeometry> | ||
</Placemark> | ||
</Document> | ||
</kml> |
Binary file not shown.
23 changes: 23 additions & 0 deletions
23
geotrek/trekking/tests/data/apidae_trek_parser/trace_with_no_line.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,23 @@ | ||
<?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> | ||
</Document> | ||
</kml> |
11 changes: 11 additions & 0 deletions
11
geotrek/trekking/tests/data/apidae_trek_parser/trek_no_multimedia_attachments_error.json
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,11 @@ | ||
{ | ||
"numFound": 1, | ||
"objetsTouristiques": [ | ||
{ | ||
"id": 123123, | ||
"nom": { | ||
"libelleFr": "Une belle randonnée de test mais sans fichiers multimedias liés, donc sans plan" | ||
} | ||
} | ||
] | ||
} |
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
22 changes: 22 additions & 0 deletions
22
geotrek/trekking/tests/data/apidae_trek_parser/trek_with_kml_trace.json
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,22 @@ | ||
{ | ||
"numFound": 1, | ||
"objetsTouristiques": [ | ||
{ | ||
"id": 123123, | ||
"multimedias": [ | ||
{ | ||
"type": "PLAN", | ||
"traductionFichiers": [ | ||
{ | ||
"url": "https://example.net/trace.kml", | ||
"extension": "kml" | ||
} | ||
] | ||
} | ||
], | ||
"nom": { | ||
"libelleFr": "Une belle randonnée de test avec un plan au format 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
Oops, something went wrong.