openkfw / mapme.protectedareas

Reproducible workflows in R for processing open geodata to create knowledge about KfW supported protected areas and conservation effectiveness.
GNU General Public License v3.0
3 stars 0 forks source link

The field GEOMETRY_TYPE is not included in WDPA dataset #108

Closed fBedecarrats closed 2 years ago

fBedecarrats commented 2 years ago

Hi there, I'm rerunning your code to make a simplified version for a training in Madagscar in October-November. Just a quick observation. You use in several instances the following line in your code : filter(GEOMETRY_TYPE != "POINT"). This raises an error when I run the code on the original WDPA dataset, as there is no field named GEOMETRY_TYPE in it. I guess either there was one such field in previous WDPA dataset versions or you run some preprocessing that is not included in the repo to prepare the wdpa-kfw dataset you fetch from your internal datalake. In any case, I advise that you add a %>% mutate(GEOMETRY_TYPE = st_geometry_type(.)) %>% somewhere upstream in the process. Kind regards, FB

Jo-Schie commented 2 years ago

Hi @fBedecarrats . That is true. It is not in the original data. We cleaned our data with the wdpar package which creates this column and then allows you to filter out points. Might be worth using this package in your case as well if you work with a lot of wdpa data.

Thanks for pointing that out. I will update it in the processing chain description, and update it.