Skip to content

Instantly share code, notes, and snippets.

@sgillies
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgillies/9577794 to your computer and use it in GitHub Desktop.
Save sgillies/9577794 to your computer and use it in GitHub Desktop.
...
#GPX GPX Yes Yes Yes (read support needs libexpat)
("GPX", "raw"),
...
>>> import fiona
>>> fiona.listlayers('docs/data/fells_loop.gpx')
[u'waypoints', u'routes', u'tracks', u'route_points', u'track_points']
>>> with fiona.open('docs/data/fells_loop.gpx', layer='routes') as routes:
... print routes.schema
...
{'geometry': 'LineString', 'properties': OrderedDict([(u'name', 'str'), (u'cmt', 'str'), (u'desc', 'str'), (u'src', 'str'), (u'link1_href', 'str'), (u'link1_text', 'str'), (u'link1_type', 'str'), (u'link2_href', 'str'), (u'link2_text', 'str'), (u'link2_type', 'str'), (u'number', 'int'), (u'type', 'str')])}
@nygeog
Copy link

nygeog commented Sep 19, 2014

Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment