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

I've downloaded the coastlines of Canada and now like to delete all islands, because I need just the contiguous coastline.

For this I think I should delete all closed ways with a certain size. How can I filter for area size in JOSM?

asked 21 Jul '18, 14:01

norcross's gravatar image

norcross
26335
accept rate: 0%


That would be closed areasize:-200. Replace the number with your preferred size in square meters.

permanent link

answered 21 Jul '18, 14:23

Hjart's gravatar image

Hjart
3.0k42656
accept rate: 18%

A search string like areasize:-100 will find areas up to 100 m² in size.

With "Expert mode" active (tick the item at the bottom of the view menu), the search window shows a hint for this search.

permanent link

answered 21 Jul '18, 14:25

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

Thanks for your replies.

But I have got many small areas from simplification (show as < 0.1 with measurement) which are not getting found by either "areasize:-100" or "waylength:-200". Adding "closed" to the string also doesn't change this.

permanent link

answered 21 Jul '18, 14:32

norcross's gravatar image

norcross
26335
accept rate: 0%

edited 21 Jul '18, 17:26

Can you point us to an example?

(21 Jul '18, 14:35) Hjart

Download coastlines from overpass-turbo, export as geojson and simplify with https://github.com/maxogden/simplify-geojson

(21 Jul '18, 14:43) norcross

Can you point us to a specific area that isn't found with the filters given above? Like i.e. https://www.openstreetmap.org/way/28296760 . Please note that the areasize filter will work for areas consisting of 1 OSM way only. The coastlines of many islands are defined by more than one OSM way. To filter those islands using the filter you will need to join the coastline ways into only one.

(21 Jul '18, 14:48) Hjart

I think it doesn't work when opening a geojson file, only when directly downloading from the OSM server.

(21 Jul '18, 15:03) norcross

There's a bug in the JOSM geojson parser where it doesn't close areas.

https://github.com/JOSM/geojson/issues/7

(22 Jul '18, 12:56) maxerickson

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:

×622
×67
×66

question asked: 21 Jul '18, 14:01

question was seen: 2,450 times

last updated: 22 Jul '18, 12:56

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