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

Let's try again.

osmfilter mi.o5m --drop-tags="amenity= name=" --drop-tags="tourism= name=" --drop-tags="leisure= name=" --drop-tags="shop= name=" --drop-tags="office= name=" --drop-tags="craft= name=" --drop-tags="club= name=" --drop-tags="government= name=" --drop-tags="building= name=" --drop-tags="man_made= name=" --drop-tags="landuse= name=" --drop-author -o=mi.osm

That seems to be removing what we want. However it's also removing building boundaries or ways or whatever you call them. So cities now only have roads and highways and such. What's the command to keep all boundaries? --keep-ways? how exactly?

Clarification. We want building polygons to stay and get rid of names. Boundaries is the wrong word for that.

asked 06 May '18, 16:39

gfitz's gravatar image

gfitz
46347
accept rate: 0%

edited 13 May '18, 23:32

surely you just want --drop-tags="name="

(08 May '18, 14:21) SK53 ♦

Will that remove roads names?

(08 May '18, 15:13) gfitz

Yes, it would remove all names.

(09 May '18, 17:50) alester

My question clearly asked about removing name tags from buildings only and amenity tourism etcetera. Already trying something else.

(09 May '18, 17:58) gfitz
2

You didn't say that you wanted to keep names for roads, though.

(09 May '18, 18:40) alester

--drop-tags="amenity=name tourism=name leisure=name shop=name office=name craft=name club=name government=name" Doesn't work. Any help?

(10 May '18, 16:57) gfitz
1

It might help if you can clarify what end-result you're trying to get. What objects do you want, and which of those objects should have names?

(10 May '18, 19:28) alester

Pretty much as the picture. Remove circled stuff while keeping everything else like roads rivers and such intact

(10 May '18, 20:13) gfitz
1

@glitz you may have to split your data into & remerge; i.e filter buildings, removing name into one file; put everything else into another, merge with osmconvert. Alternatively you could use osmosis with tag-transform.

(13 May '18, 12:41) SK53 ♦
showing 5 of 9 show 4 more comments

-1

Load what you want into a database. Remove the names you want. That's it.

permanent link

answered 13 May '18, 16:47

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 13 May '18, 21:50

1

How? why doesn't dropping tag x= name= only remove the names only? what's the syntax to keep the polygons or boundaries intact?

(13 May '18, 19:33) gfitz
1

The point about loading it into a database is that you can then run SQL statements on it as complicated as you like to remove some names and not others, depending on any rules that you care to set yourself.

You haven't said in the question what you're actually trying to achieve here (i.e. what you're going to do with the data afterwards), but I'm guessing that this is a rendering question largely because your other question was.

(13 May '18, 20:42) SomeoneElse ♦

Sorry. AFAIK it was pretty clear what my goals were. It can't be any simpler. That's why we went to osmfilter and it seems to be doing the job almost perfectly. If there's a command to filter out ''name'' tags then why does it remove building polygons?

Why the need to go into SQL queries when osmfilter seems to be the right tool for this?

(13 May '18, 22:52) gfitz

you don't understand the answer ... sql helps only, --keep is a valid option for osmfilter, which doesn't remove buildings. To get buildings, you will need buildings tags. If you remove these tags, the buildings cannot be identified anymore.

(13 May '18, 23:43) AntaC

So is it impossible to use osmfilter to remove name tags from [amenity= government= craft= building= man_made= landuse= club= shop= office= landuse= leisure=] while keeping everything else?

(14 May '18, 00:22) gfitz

take a small extract and try combinations of keep and drop. It is a chance to have osmconvert & osmfilter

(14 May '18, 01:28) AntaC

Already tried with the command that's in the question and it almost works. There must be a keep= syntax to keep all polygons that am missing.

(14 May '18, 14:42) gfitz

@gfitz this program is a gift from its author. You can order to companies the perfect tool you need

(14 May '18, 15:55) AntaC

Why does it sound like am asking for something super complex? remove only name tags from x keys.

(14 May '18, 16:18) gfitz
showing 5 of 9 show 4 more comments

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:

×167
×129
×92
×60
×24

question asked: 06 May '18, 16:39

question was seen: 2,718 times

last updated: 14 May '18, 16:18

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