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

Should we add osmox to the repo? #19

Open
Hussein-Mahfouz opened this issue Apr 19, 2024 · 4 comments
Open

Should we add osmox to the repo? #19

Hussein-Mahfouz opened this issue Apr 19, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request reproducibility Reproducibility Task 2 assigning activities to geographic locations

Comments

@Hussein-Mahfouz
Copy link
Collaborator

I have tried osmox for mapping activity purposes to osm POIs and it works very well. I am currently cloning the osmox repo to a different directory on my machine, downloading the osm data through geofabrik, processing the data, and returning the output file back to the acbm repo for analysis.

Should osmox be available inside the acbm repo? If so, what is the best way to install it? To use it you have to clone the repo, create a virtual environment, and run a command line tool (see instructions here). @sgreenbury what do you think?

The pipeline could be run using a python script for different areas:

  • download pbf using pyrosm
  • run system command through python
@Hussein-Mahfouz Hussein-Mahfouz added enhancement New feature or request Task 2 assigning activities to geographic locations labels Apr 19, 2024
@sgreenbury
Copy link
Collaborator

sgreenbury commented Apr 25, 2024

I think your script pipeline sounds like a good option since it is designed to be used as a CLI. You could install in a separate venv and run that directly (e.g. it will be in path .venv/bin/osmox) or it should now work adding as a dependency to acbm too (I've updated the uatk-spc pyrarrow dependency so they should be compatible):

poetry add git+https://github.com/arup-group/osmox

It can then be called from the same python venv as the acbm one with (e.g. the example in the docs):

import subprocess
subprocess.run("osmox run configs/example.json example/isle-of-man-latest.osm.pbf example/isle-of-man -f geopackage -crs epsg:27700 -l".split(" "))

We could write a python function with a cache (to avoid rerunning) as part of the acbm module too so that it can be called directly if that is more convenient - will it need to be run once or many times for a given area?

@Hussein-Mahfouz
Copy link
Collaborator Author

The choice of separate venv vs adding directly to acbm is worth discussing, as I'm facing a similar question with pam, ref #18

We could write a python function with a cache (to avoid rerunning) as part of the acbm module too so that it can be called directly if that is more convenient - will it need to be run once or many times for a given area?

I like this idea. It should only be run once for every area, but we could have an update option in the function if we want to rerun (e.g. if we have changed the config file)

@Hussein-Mahfouz
Copy link
Collaborator Author

another option for downloading osm data: pydriosm

@sgreenbury
Copy link
Collaborator

Also for retail floor space, there is geolytix data used in QUANT_RAMP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request reproducibility Reproducibility Task 2 assigning activities to geographic locations
Projects
None yet
Development

No branches or pull requests

2 participants