pypsa-eur icon indicating copy to clipboard operation
pypsa-eur copied to clipboard

Add crs to config to make code less error prone

Open pz-max opened this issue 3 years ago • 0 comments

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?

pz-max avatar Jul 05 '22 15:07 pz-max