gemgis.vector.load_gpx_as_geometry
gemgis.vector.load_gpx_as_geometry#
- gemgis.vector.load_gpx_as_geometry(path: str, layer: Union[int, str] = 'tracks') shapely.geometry.base.BaseGeometry #
Loading a GPX file as Shapely Geometry
- 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 istracks
- Returns
shape – Shapely BaseGeometry containing the geometry data of the GPX file
- Return type
shapely.geometry.base.BaseGeometry
New in version 1.0.x.
Example
>>> # Loading Libraries and File >>> import gemgis as gg >>> gpx = gg.vector.load_gpx_as_geometry(path='file.gpx', layer='tracks') >>> gpx.wkt 'MULTILINESTRING ((8.496285 52.705566, 8.496270000000001 52.705593, 8.496233999999999 52.705629, 8.496205 52.705664, 8.496181 52.705705, 8.496171 52.705754,...)
See also
load_gpx
Loading a GPX file as Collection
load_gpx_as_dict
Loading a GPX file as dict