pypsa-meets-earth / earth-osm

Python tool to extract large-amounts of OpenStreetMap data
https://pypsa-meets-earth.github.io/earth-osm/
MIT License
21 stars 10 forks source link

Some countries may be missing #29

Closed davide-f closed 1 year ago

davide-f commented 1 year ago

Found a nice little bug? Fill out the section below. ⬇️

Describe the bug

In geofabrik, as known, some countries are merged into a non conventional code. Some, such as Senegal and Gambia are already included, but some ar missing. An example is malaysia, singapore and brunei. Only malaysia can be found. This list may not be exhaustive.

With the previous implementation of PyPSA-Earth, we cleaned the config_osm_data and verified for Asia, Africa and South America. That may be of help hopefully.

I saw that the json is loaded from the website, but there are issues. For example, saudi arabia, that is merged together with GCC is missing; some manual fixing may be needed, I will be doing that locally

mnm-matin commented 1 year ago

gcc can be extracted using either the country code: QA-AE-OM-BH-KW or name gcc-states see earth_osm view regions

the joint malaysia, singapore & brunei can be extracted using malaysia-singapore-brunei or MY

verified as working using

earth_osm extract power --regions gcc-states MY

let me know if it works for you

davide-f commented 1 year ago

gcc can be extracted using either the country code: QA-AE-OM-BH-KW or name gcc-states see earth_osm view regions

the joint malaysia, singapore & brunei can be extracted using malaysia-singapore-brunei or MY

verified as working using

earth_osm extract power --regions gcc-states MY

let me know if it works for you

MY works but saudi arabia does not; the same applies for various countries in the pacific unfortunately. if you search for "SA" in the json by geofabrik it is missing; "SA" is included in the gcc countries but it is missing unfortunately

mnm-matin commented 1 year ago

Hi Davide, The geofabrik sitemap json is not meant as a replacement for an exhaustive list of all the countries in the world. It is a lists of all the pbf files available to download. If I check the geofabrik website for asia and place my cursor over gcc-states, it highlights the region including saudi arabia. According to wikipedia the GCC includes Bahrain, Kuwait, Oman, Qatar, Saudi Arabia, and the United Arab Emirates.

lines extracted using earth osm

^created using

earth-osm extract power --regions gcc-states
davide-f commented 1 year ago

Yep, understanding that, just saying that there are problems with the location of 2 country letter codes so they is unreliable. The workaround may is to use the other tag names.

Moreover, some codes, e.g. "VU" are duplicated

davide-f commented 1 year ago

Closing