You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
#1 2016-01-04 18:15:40
- silver mapper
- Member
- Registered: 2008-06-26
- Posts: 58
JOSM: Is it possible to retain keys/values when exporting a selection?
I am checking Public Rights of Way in my local area of Oxfordshire and adding or editing keys and values of ways. I have selected these ways in JOSM and exported them to a .gpx file first then converted that file using DNR GPS .exe to an ESRI .shp file in order to check for completeness against a master Public Rights of Way dataset. I lose the ways' attributes upon export to the .gpx file, it seems. Is there any means by which I might retain such information?
Offline
#2 2016-01-05 07:22:45
- escada
- Moderator

- Registered: 2011-08-13
- Posts: 1,754
Re: JOSM: Is it possible to retain keys/values when exporting a selection?
The GPX format is not very rich, it does not have the possibility to store arbitrairy key-value pairs on waypoints. You will need a small program that converts the key-value pairs into a key that is understood in GPX.
An example of a waypoint in a GPX file is
<wpt lat="50.91" lon="4.19722222222">
<name>NOK-Woning, rijhuis Markt 8</name>
<desc>39328 Woning, rijhuis - Markt 8</desc>
</wpt>
So all the key-value pairs will have to be encoded in either the name or desc(ription) tag. I don't know a program that does this for you, but that does not mean there is one out there.
p.s. The above is from a GPX-file that I generate based on a wikipedia page listing heritage buildings in Belgium, such as https://nl.wikipedia.org/wiki/Lijst_van … n_Kruibeke
Offline
#3 2016-01-05 18:03:24
- stephan75
- Member
- Registered: 2008-05-28
- Posts: 2,918
Re: JOSM: Is it possible to retain keys/values when exporting a selection?
Maybe geoJSON is an alternative?
see https://en.wikipedia.org/wiki/GeoJSON
You can produce that format via http://wiki.openstreetmap.org/wiki/Overpass_turbo -> Export
Offline
#4 2016-01-05 22:50:19
- silver mapper
- Member
- Registered: 2008-06-26
- Posts: 58
Re: JOSM: Is it possible to retain keys/values when exporting a selection?
stephan75
That is a lot of food for thought. I was introduced to Overpass turbo through Robert Whittaker's website that offers queries for various aspects of Public Rights of Way, which led to my original question, indirectly. It is a much bigger step for me to assemble my own query. Nevertheless, it seems to be the direction in which I am being pointed.
I thank you for your constructive reply.
Offline
#5 2016-01-08 09:40:50
- silver mapper
- Member
- Registered: 2008-06-26
- Posts: 58
Re: JOSM: Is it possible to retain keys/values when exporting a selection?
stephan75
I am delighted to report complete success in answer to my question, using Overpass turbo and GeoJSON. I obtained a query result in Overpass turbo and exported it to GeoJSON. I needed to convert that file to ESRI .shp. A search led me to the ESRI Community here https://geonet.esri.com/thread/105193 and a suggestion to use mapshaper. It is a simple step to convert to .shp. This allows me to open the file in MapInfo, mapping software I have used for twenty years. I am presented with seven fields: _id, Fid, Designatio, Foot, Highway, Prow_ref and Ref_Chilte. In other words, all the details I require, and more.
I am indebted to you for your suggestion.
Offline