NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I genrated and osm file from overpass which consists of some specific tags that i need.

Overpass query

way({{bbox}})["amenity"~'hospital|clinic|health_post|health_center|nursing_home|dentist']["building"]["operator"]["operator:type"]["capacity:beds"];node(w);

I want to filter the file to contain only the above tags. It only outputs the keys without colon in them. i.e i don't get the operator:type and capacity:beds and some others.

Is there a work around for this?

My cmd

osmfilter health_facility.osm --keep-tags="all amenity= building= operator= operator:type= capacity:beds=" -o=filteres.osm

asked 10 Aug '13, 09:40

amritkarma's gravatar image

amritkarma
684212941
accept rate: 11%

if you cannot get any help here, try the discussion page of http://wiki.openstreetmap.org/wiki/Osmfilter in the OSM wiki.

(11 Aug '13, 20:08) stephan75
1

Are you really sure that there are objects in your input osm file that have the attributes with the colon? Please provide an overpass-turbo permalink, so we can experiment with the data. I have no problems filtering on keys with a colon in them.

(12 Aug '13, 12:07) gormo
2

Do you mean the Katmandu area in Nepal? http://overpass-turbo.eu/s/Ku

(12 Aug '13, 12:35) gormo

Same here, I have an osm with nodes like these.

<way id="5560559" version="2" timestamp="2010-04-02T23:40:53Z" changeset="4309152" uid="20587" user="balrog-kun">
    <nd ref="41190944"/>
    <nd ref="41190945"/>
    <tag k="name" v="North Jackson Circle"/>
    <tag k="highway" v="residential"/>
    <tag k="tiger:cfcc" v="A41"/>
    <tag k="tiger:tlid" v="128331343"/>
    <tag k="tiger:county" v="Maricopa, AZ"/>
    <tag k="tiger:source" v="tiger_import_dch_v0.6_20070809"/>
    <tag k="tiger:reviewed" v="no"/>
    <tag k="tiger:zip_left" v="85205"/>
    <tag k="tiger:name_base" v="Jackson"/>
    <tag k="tiger:name_type" v="Cir"/>
    <tag k="tiger:separated" v="no"/>
    <tag k="tiger:zip_right" v="85205"/>
    <tag k="tiger:name_direction_prefix" v="N"/>
</way>

which I want to filter out with this instruction

osmosis --read-xml arizona_highways_residentials.osm --tf accept-ways tiger:county="Maricopa, AZ" --tf reject-relations --used-node --write-xml arizona_maricopa_highways_residentials.osm

But it does not work, it works if I do highway=residential, though

(24 Mar '16, 09:12) lanzalibre

@lanzalibre is that related to this question in any way? They were using osmfilter; you're using osmosis? I'd suggest asking a separate question (and say what OS you're using, as that can change what you type on the command line before osmosis even sees it).

(24 Mar '16, 09:18) SomeoneElse ♦

You are very right. Here is the corresponding osmfilter query with the exact same result

osmfilter arizona_highways_residentials.osm --keep="tiger:county='Maricopa, AZ'" > arizona_maricopa_highways_residentials.osm

(24 Mar '16, 16:03) lanzalibre
showing 5 of 6 show 1 more comments

I have performed the following steps:

  1. Perform Overpass query from http://overpass-turbo.eu/s/Ku
  2. Download data (Export tab, then "as raw data from overpass interpreter") as nepal_health.osm
  3. osmfilter.exe nepal_health.osm --keep-tags="all amenity= building= operator= operator:type= capacity:beds=" > nepal_health_filtered.osm

The resulting document contains all the tags you mentioned.

permanent link

answered 12 Aug '13, 12:46

gormo's gravatar image

gormo
2.9k32660
accept rate: 13%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×191
×66
×60
×3

question asked: 10 Aug '13, 09:40

question was seen: 6,313 times

last updated: 24 Mar '16, 16:03

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum