PyPSA / PyPSA/pypsa-eur

Add crs to config to make code less error prone

Open
#393 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design help wanted low priority question
Dominant language
Python
Stars
615
Forks
459
Avg merge
4d 14h
Merged PRs (30d)
6

Description

Describe the feature you'd like to see

In PyPSA-Africa/Earth we define the crs system (coordinate reference system) in the config.

# definition of the Coordinate Reference Systems
crs:
  geo_crs: EPSG:4326  # general geographic projection, not used for metric measures. "EPSG:4326" is the standard used by OSM and google maps
  distance_crs: EPSG:3857  # projection for distance measurements only. Possible recommended values are "EPSG:3857" (used by OSM and Google Maps)
  area_crs: ESRI:54009  # projection for area measurements only. Possible recommended values are Global Mollweide "ESRI:54009"

These values are then important by scripts & functions as shown here:
https://github.com/pypsa-meets-africa/pypsa-africa/blob/4d7174ae5e75ba62fb2a9981c27b45a45873be52/scripts/clean_osm_data.py#L782-L836

This could be also adapted in PyPSA-Eur making the code less error-prone.
Maybe someone wants to implement this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the CRS configuration shown in the issue with the referenced scripts/clean_osm_data.py implementation, then locate the corresponding PyPSA-Eur configuration and geospatial processing code. The work is done when the relevant CRS values are defined in configuration and the affected scripts and functions use them instead of hard-coded values.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.