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

Hi guys,

I am a complete newbie, any help would is highly appreciated. I am working with a shapefile of the MSOA regions in the UK and would like to get a count of all the sport centres within each of these regions.

What's the best way to approach this using Python?

Thanks

asked 07 Jun '19, 08:42

bf08's gravatar image

bf08
1111
accept rate: 0%


A simpler was would be to use QGIS. With a layer of MSOAs and a layer of sports centre centroids (example Overpass query) it is a simple Point in Polygon query. In python I would guess you will want to use something like Shapely to manipulate the data (for instance as discussed in this old blog post).

One important caveat is that leisure=sports_centre in OSM is often not equivalent to a council or privately run sports or leisure centre in ordinary UK parlance (i.e., offering a range of sports). It is often used with any sports related facility such as a private rugby club or a tennis centre.

permanent link

answered 07 Jun '19, 14:00

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

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:

×205
×87
×35
×8
×3

question asked: 07 Jun '19, 08:42

question was seen: 1,653 times

last updated: 07 Jun '19, 14:00

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