gemgis.vector.load_gpx#

gemgis.vector.load_gpx(path: str, layer: Union[int, str] = 'tracks') Collection#

Loading a GPX file as collection

Parameters
  • path (str) – Path to the GPX file, e.g. path='file.gpx'

  • layer (Union[int, str]) – The integer index or name of a layer in a multi-layer dataset, e.g. layer='tracks', default is tracks

Returns

gpx – Collection containing the GPX data

Return type

dict

New in version 1.0.x.

Example

>>> # Loading Libraries and File
>>> import gemgis as gg
>>> gpx = gg.vector.load_gpx(path='file.gpx', layer='tracks')
>>> gpx
<open Collection 'file.gpx:tracks', mode 'r' at 0x24f1c90ffa0>

See also

load_gpx_as_dict

Loading a GPX file as dict

load_gpx_as_geometry

Loading a GPX file as Shapely BaseGeometry