| 1 |
<para> |
| 2 |
This module supports a subset of the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://geojson.org/">GeoJSON</link> format. |
| 3 |
</para> |
| 4 |
<para> |
| 5 |
GeoJSON is a poor fit for GPSBabel's internal data structures as GPSBabel |
| 6 |
was designed more around common GPS features (waypoints, tracks, routes) |
| 7 |
than about GIS-style concepts like MultiPolygons or Geometry Collections. |
| 8 |
In reality, for all but the most simple uses (such as converting a format |
| 9 |
that GPSBabel supports well to something like Leaflet, you should not expect |
| 10 |
high fidelity transfers through this format. |
| 11 |
</para> |
| 12 |
<para> |
| 13 |
Waypoints are mapped to a FeatureCollection of Points. |
| 14 |
The properties for name and description are written, where available. |
| 15 |
Tracks are converted to a LineString. |
| 16 |
MultiPoint are converted to Waypoints. |
| 17 |
LineString, Polygon and MultiPolygon are converted to routes. |
| 18 |
MultiLineString are converted to tracks. |
| 19 |
</para> |
| 20 |
<para> |
| 21 |
The potentially nested/recursive nature of GeoJSON in general would be |
| 22 |
an awkward implementation. |
| 23 |
</para> |
| 24 |
<para> |
| 25 |
Initial development was free-handed by looking at the <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://tools.ietf.org/html/rfc7946 ">GeoJSON RFC</link>. Corner cases were handled by |
| 26 |
using <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.gdal.org/ogr2ogr.html">GDAL's ogr2ogr</link> |
| 27 |
to convert GPX to JSON and compare the output. The results were then |
| 28 |
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://geojsonlint.com/">JSON validated</link> and viewed on |
| 29 |
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://geojson.io/">JSON web viewer</link>. |
| 30 |
</para> |