londonmapbot icon indicating copy to clipboard operation
londonmapbot copied to clipboard

Check if point is within Greater London boundary

Open mattkerlogue opened this issue 5 years ago • 6 comments

Bit of extra effort, but perhaps you could store the boundary of Greater London (you can pull them from the ONS Geoportal using sf::st_read(https://opendata.arcgis.com/datasets/324a9f3ad2cc4a049e913dddc508aeb2_0.geojson?where=rgn19nm%20%3D%20'London')) and then check whether the random points calculated are located within this polygon.

mattkerlogue avatar Oct 07 '20 23:10 mattkerlogue

True.

This is the type of information that could be posted with the tweet itself, along with things like nearest tube (as per Ken Butler). I like the simplicity of the tweet content for now.

I'll definitely be doing further analysis, though. For example, a map app with pop-up info (like in/out of Greater London, what borough it's in, etc). Might try training a classifier on 'rural'/'urban' too.

matt-dray avatar Oct 08 '20 09:10 matt-dray

Agree with simplicity, was mainly thinking about it only giving "valid" London coordinates.

On rural/urban there's an ONS rural/urban classification.

mattkerlogue avatar Oct 08 '20 10:10 mattkerlogue

Haha, I know all too well: I was on the team that devised and developed that classification! I was thinking of hand-tagging with a simple binary of 'built-up' versus not and then predicting new tweets as they come in.

matt-dray avatar Oct 08 '20 10:10 matt-dray

Would this risk tagging photos that are bang in the middle of large parks (Hyde Park, Richmond Park, Hampstead Heath) as "rural"? Maybe a different description "green/grey/brown":

  • Green: park/farmland
  • Grey: built environment
  • Brown: (ex-)industrial/construction

Also how it would treat large bodies of water (eg reservoirs and the lower reaches of the Thames)?

mattkerlogue avatar Oct 08 '20 11:10 mattkerlogue

Water isn't built-up, so it would be 'not built-up' 😄

I was thinking of doing it for a 'train a classifier for beginners' sort of blog post, so simplicity would be key. Could demonstrate a few approaches re binary/multi-class. There's definitely a question about images that have multiple land-use types. Could quantify colour in the image to guess the predominant case.

matt-dray avatar Oct 08 '20 14:10 matt-dray

Related: a post from Ken Butler on sampling points from within Toronto limits: http://ritsokiguess.site/docs/2020/10/10/sampling-from-locations-in-a-city/

matt-dray avatar Oct 11 '20 10:10 matt-dray