Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to include urban and periurban boundary in blocks definition #135

Open
nmarchio opened this issue Mar 9, 2023 · 0 comments
Open

Comments

@nmarchio
Copy link
Member

nmarchio commented Mar 9, 2023

When building blocks, users should be able to add an arbitrary set of boundaries to include in a block definition (i.e., user supplied data on admin divisions or urban boundaries, or geohashes).

The use case for this is that some users may want to cut and delineate block geometries for their specific application based on different criteria (maybe they need to link to special administrative boundaries or want to focus their analysis on urban areas using some morphological definition). As as result, it may make sense to expose an option that allows users choose what kinds of additional divisions they'd like to incorporate in the block geometry. These arbitrary definitions can also help with chunking the data.

This goes beyond a blob of linestrings from OSM that a user would define however they want (but the default option would be natural features + highways minus footpaths + railroads).

So we may want a class of methods for adding custom boundaries to block definition:

  • known admin boundaries (user supplied GeoDataFrame) i.e., OSM with "admin_level=4"
  • geohash level (user specified level of geohash precision detail) i.e.,
    representative_pt = gadm_blocks.geometry.representative_point().to_list()
    blocks['block_geohash'] = list(map(lambda x: pygeohash.encode(x.x,x.y, precision=10), representative_pt))
  • urban boundaries based on unsupervised method i.e., COIN algorithm (see below)
  • urban boundaries based on external data source or set of heuristics i.e., GHSL (see below)

Block script: https://github.com/mansueto-institute/kblock/blob/main/kblock/batch_1b_generate_blocks.py

Unsupervised methodological ideas for urban network:
Use network analysis:
https://docs.momepy.org/en/stable/user_guide/graph/coins.html#Using-OpenStreetMap-data
https://docs.momepy.org/en/stable/user_guide/graph/centrality.html#Global-closeness

Data to define buffers around urban boundaries (see images):

conurbation_buffer['urban_diameter'] = (np.sqrt(conurbation_buffer['urban_area']/np.pi)*2).clip(lower=0, upper=10000)
conurbation_buffer['geometry'] = conurbation_buffer['geometry'].to_crs(3395).buffer(conurbation_buffer['urban_diameter']*1).to_crs(4326)

image
image

@nmarchio nmarchio changed the title Option to include periurban boundary in blocks definition Option to include urban and periurban boundary in blocks definition Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant