This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

[Overpass-api] Is is possible to print only one key?

0

I need to know if its possible to print only the required key, for eg: i need nodes with add:street key , but what i want in the output is only that addr:street key not other tags like name,addr:city etc.

asked 04 Feb '16, 13:10

Arun%20Gowtham's gravatar image

Arun Gowtham
0111114
accept rate: 0%


One Answer:

2

out:csv is one way to do this.

Something like (untested) [out:csv(::lat,::lon,"addr:street")].

For ways and relations, ::lat and ::lon are output if you also use out center as your print statement. If you aren't interested in the coordinates, they can also just be omitted.

answered 04 Feb '16, 13:35

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

@maxerickson Is there any workaround for JSON format?

(04 Feb '16, 13:41) Arun Gowtham

Not that I know of. I guess it is easy enough to do on the client side that filtering tags isn't a high priority.

(04 Feb '16, 13:54) maxerickson