1

I try to filter the polygons of an .osm by their area. Now it's about swiss lakes. I extracted all the polygons using the "natural=water" filter, but I still have all the ponds of Switzerland. Therefore I try to add a filter using the area of the polygons. How can I do it??

I have allready searched some solutions, but was unable to find good answer. The best I found was this question but I don't know where I should execute it and if it is compatible with osm data.

Thanks for your answers

1 Answers1

0

One way to solve this issue would be to use Atlas. Here are the steps you would need to follow (with links to other related SO answers inline):

  1. Convert your OSM file to a .osm.pbf using osmosis
  2. Load the .osm.pbf into an Atlas file, using atlas-shell-tools's pbf2atlas subcommand
  3. Write a small Java class that opens the Atlas file, gets all the lakes using a TaggableFilter, and then filters them by area, using Polygon.getSurface().
matthieun
  • 763
  • 5
  • 13