Geographic Information Systems Asked by Lay on August 13, 2021
I have a gpx track and want to import it to QGIS using PyQGIS.
When I add the gpx manually (add vector layer),
I select track points,
and get all the points and attributes with the new layer:
When using PyQGIS(method described here), tracks import fine, but route points seem replaced by tracks.
gpx_names = ["track_points", "tracks"]
for entry in inFolder:
for name in gpx_names:
layerName=((os.path.splitext(entry)[0])+' '+name)
gpx_layer=iface.addVectorLayer(os.path.join(dataPath, entry)+"?type="+name, layerName, "gpx")
(Using "|layername="
instead of "?type="
didn’t help
How can I fix this/add my gpx as route points using PyQGIS?
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP