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

Add output crs #73

Merged
merged 14 commits into from
Nov 29, 2024
Merged

Add output crs #73

merged 14 commits into from
Nov 29, 2024

Conversation

Hussein-Mahfouz
Copy link
Collaborator

@Hussein-Mahfouz Hussein-Mahfouz commented Nov 26, 2024

This PR should close #72. It introduces a new configuration option to specify the output coordinate reference system (CRS) for various scripts. The changes ensure that all relevant data transformations and file outputs use the specified CRS from the configuration.

Configuration Changes:

  • Added output_crs parameter to the config/base.toml file to specify the desired output CRS.
  • Updated the Parameters class in src/acbm/config.py to include the output_crs attribute and added a property method to access it.

Script Updates:

  • Modified scripts/0.1_run_osmox.py, scripts/0_preprocess_inputs.py, scripts/3.1_assign_primary_feasible_zones.py, scripts/3.2.1_assign_primary_zone_edu.py, scripts/3.2.2_assign_primary_zone_work.py, scripts/3.2.3_assign_secondary_zone.py, scripts/3.3_assign_facility_all.py, and scripts/4_validation.py to use the output_crs from the configuration for CRS transformations and file outputs.
  • Modified scripts/3.1_assign_primary_feasible_zones.py and scripts/3.2.3_assign_secondary_zone.py to load correct travel_times based on config.boundary_geography (instead of hardcoded oa/ path)

Function Updates:

  • Updated plot_desire_lines and plot_scatter_actual_reported functions in src/acbm/assigning/plots.py to accept a crs parameter and use it for CRS transformations.
  • Update the add_locations_to_activity_chains function to use geopandas instead of a pyproj transformer, and to take in a crs parameter to convert the centroid point layer to (instead of hardcoded 4326)

@Hussein-Mahfouz Hussein-Mahfouz linked an issue Nov 26, 2024 that may be closed by this pull request
Copy link
Collaborator

@sgreenbury sgreenbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Hussein-Mahfouz for adding this feature and the changes, as discussed I'll go ahead and merge as all looks good!

@sgreenbury sgreenbury merged commit 39cb7cf into 56-write-output-to-matsim-format Nov 29, 2024
4 checks passed
@sgreenbury sgreenbury deleted the add-output-crs branch November 29, 2024 17:06
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

Successfully merging this pull request may close these issues.

Add output CRS to config
2 participants