Why not ask your question on the new OpenStreetMap Community Forum?

Is there a way to determine if a given path (e.g. footway) is part of/inside a park or a green space.

asked 08 Apr '13, 00:20

Sadeer's gravatar image

accept rate: 0%

Yes but you will have to do the required computation yourself. Import the OSM data into a spatial database (e.g. into PostGIS using osm2pgsql) and then if you want to know whether way #123 goes through a park you could write something like

select count(*) from planet_osm_polygon where leisure='park' and st_intersects(way, (select way from planet_osm_line where osm_id=123);

This returns the number of parks that the way leads through. Of course more complex queries are possible, e.g. find out what percentage of the way lies in a park, or whether a park lies in the vicinity of the way.

There is no ready-made online service that does such computations for you.

permanent link

answered 08 Apr '13, 07:23

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 08 Apr '13, 00:20

question was seen: 3,506 times

last updated: 08 Apr '13, 07:23

powered by OSQA