Page MenuHomePhabricator

Support for GPS eXchange Format (GPX)
Open, MediumPublicFeature

Description

“GPX, or GPS eXchange Format is an XML schema designed as a common GPS data format for software applications.” [1]

WikiVoyage use GPX to show itineraries on maps. They would like to centralise these on Wikimedia Commons. [2]

[1] https://en.wikipedia.org/wiki/GPS_eXchange_Format
[2] https://commons.wikimedia.org/wiki/Special:PermanentLink/102230650#Upload_GPX_files_to_Commons.3F


Version: 1.22.0
Severity: enhancement
See Also:

Details

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:57 AM
bzimport set Reference to bz53023.
bzimport added a subscriber: Unknown Object (MLST).

You can upload the file here
https://commonsarchive.wmflabs.org

And add the template:
{{Commons Archive|My_raw_file.gpx}}

in your image in commons, look this example with NEF file in this case:
https://commons.wikimedia.org/w/index.php?title=File:Agraulis_vanillae_at_Isla_Margarita.jpg&action=edit

Copying from T28059#2726773 - identical reasoning:

I think we should consider a few things when implementing (or not implementing) this task. There are several reasons to store GPX data on wiki:

  • store a well known geographical object feature, such as a city/country/park/building outline, or a line (i.e. a road/river/...). I believe most of the existing GPX data in wiki falls into this category.
  • store an article specific map information, such as the area of an animal habitat, or some transient feature like the army positions during an armed conflict.

I think wiki is not well suited to solve the first use case - OpenStreetMap has the vast number of tools and the needed community's process to keep this information accurate and up to date, and we already have the way to show that data in wiki articles - see examples. The only requirement is that OSM's objects are tagged with the Wikidata IDs.
The second usecase is much more valid for on-wiki storage since we don't support (yet) any external geo data sources. Yet, I think GPX format is a dead end - it is much harder to process, and the industry has moved towards formats like GeoJSON/TopoJSON, which are better for machine processing at the servers and browsers.
That said, I understand there are many instances where the legacy GPX format is still in use. So I think we could implement 3 "levels of support":

  • require users to use numerous online GPX to GeoJSON converters, and only store GeoJSON
  • same as above, but also allow a way to download data as GPX - doing an on-the-fly conversion
  • same as first two, plus offer a way to upload GPX, which will be dynamically converted and stored as GeoJSON.

Per above, I think native GPX support (storing data as GPX) is counterproductive, and will increase our tech debt without providing much benefit due to the first use case being solved via OSM, and the second one being solved with the native geojson storage.

With GeoJSON now being available in the Data: namespace at Commons, maybe converting to GeoJSON automatically during upload could be an option?

There is still a need in Wikivoyage to allow the voyager to download GPX traces for use on a handheld device (such as Garmin's GPS units - where the format originated). That allows the user to carry the data offline with them during their travels.

An example usage case is the itinerary https://en.wikivoyage.org/wiki/Oregon_Trail where it's difficult to follow the original, pre-1870 ox-cart trail's path with multiple modern roads without getting more thoroughly lost than the Donner Party. The {{GPX}} template on Wikivoyage allows a list of the POI's from the article to be downloaded as GPX, but doesn't allow tracks or paths (which are now GeoJSON because of the transition to mw:extension:Kartographer) to be downloaded.

That article's GPX trace was dumped on https://commonsarchive.wmflabs.org/wiki/File:Oregon_Trail_GPX,_Independence_MO_to_Oregon_City_OR.gpx before the Wikivoyage itinerary was featured - but there has to be a better way to do this without pushing content to external sites?

Change 642756 had a related patch set uploaded (by Reception123; owner: Reception123):
[mediawiki/core@master] Include MIME support for .gpx filetype

https://gerrit.wikimedia.org/r/642756

My idea of using the GPX format in Wikipedia is to provide the user the option to download the information that a certain map contains, a Way of St. James for example, for use on mobile devices, not to use that file, that format, in the development of maps. It would be to transform the Data:way.map, GeoJSON, without having to upload the same way.geojson file and having to explain what and how he has to do to get the GPX. Maybe an on-the-fly conversion, as Yurik says.

This can be an addition to the functionality of the information that Wikipedia provides.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:23 PM