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

Hello every one, I am new to opensreetmap but i found it is a great project.

I am trying to statisc the green space in a city (i got the geojson,then i treat it by geopandas of python) So i use overpass to get all the elements of natural.

But the pb is that the geometry sharpes is covered and mixted. for example:

          - parks in parks, 
          - garden in parks

` - etc

I just want all the indepent shapes (filter the samll shapes inside if exsits), i readed the wiki,but i did not find a specific solution, do you have any advice?

Thanks in advance

alt text

QL code [out:json][timeout:25]; // gather results ( // query part

  way["leisure"="garden"]({{bbox}});
  relation["leisure"="garden"]({{bbox}});

  way["leisure"="golf_course"]({{bbox}});
  relation["leisure"="golf_course"]({{bbox}});

  way["leisure"="park"]({{bbox}});
  relation["leisure"="park"]({{bbox}});

  way["leisure"="dog_park"]({{bbox}});
  relation["leisure"="dog_park"]({{bbox}});

  way["leisure"="pitch"]({{bbox}});
  relation["leisure"="pitch"]({{bbox}});

 way["landuse"="village_green"]({{bbox}});
 way["landuse"="meadow"]({{bbox}});
 way["landuse"="forest"]({{bbox}});
 relation["landuse"="forest"]({{bbox}});

);
// print results
out body;
>;
out skel qt;

asked 23 Mar '18, 12:08

xiaoyuan1998's gravatar image

xiaoyuan1998
21113
accept rate: 0%

edited 23 Mar '18, 12:12


You should be able to do a single union across all the data, providing you ignore the relevant landuse tags. This looks to describe the relevant operations in geopandas: http://geopandas.org/set_operations.html. You can do equivalent operations in QGIS and PostGis.

Note that if you are trying to do something more than just determine the area of green space: for instance creating a coherent dataset of green space the problem becomes considerably more complicated.

permanent link

answered 23 Mar '18, 13:00

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

Thanks your answer, i i have tried geopanda, the one pb is that geopadans can not read all the geo shape, the antoher pb is that when there are more than 40 small shapes for a city.. it is very long to do the union of the set of shapes.

(26 Mar '18, 13:00) xiaoyuan1998

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:

×2

question asked: 23 Mar '18, 12:08

question was seen: 1,564 times

last updated: 26 Mar '18, 13:00

Related questions

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