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

Would be nice if CoordinateCleaner::countryref had sq-km column. #13

Closed
jhnwllr opened this issue Feb 18, 2019 · 6 comments
Closed

Would be nice if CoordinateCleaner::countryref had sq-km column. #13

jhnwllr opened this issue Feb 18, 2019 · 6 comments

Comments

@jhnwllr
Copy link

jhnwllr commented Feb 18, 2019

I think the CoordinateCleaner::countryref table needs a sq-km column.

If each country or administrative zone had a total area in like square kilometers, it would really help improve the filtering.

It is possible to download admin zones from this place:

https://gadm.org/download_country_v3.html

Then it might be possible to generate a simple column with country areas so that an individual could only filter out countries or admin zones that have and area below a certain resolution. I would be willing to do this and make a PR if it is not already being done.

@azizka
Copy link
Collaborator

azizka commented Feb 18, 2019

Hi,

yes please go ahead and do this. I suggest using the www.naturalearthdata.com, rather than gadm to be consistent.

@jhnwllr
Copy link
Author

jhnwllr commented Feb 18, 2019

@azizka ok will work from naturalearth data.

@jhnwllr
Copy link
Author

jhnwllr commented Feb 19, 2019

#14

@jhnwllr
Copy link
Author

jhnwllr commented Feb 27, 2019

I am thinking that cc_cen should now have a way to exclude small regions.

I think something like this would work?

    if (!is.null(min_area)) { 
      # remove missing and too small 
      ref <- ref[ref$area_sqkm > min_area & !is.na(ref$area_sqkm), ] 
    }

Where min_area is a new argument defining areas too small to include in the centroid filtering. This way we could exclude places like Monoco.

monoco

Where even a 2km centroid buffer covers the whole country and even bleeds a little into France. I can make a pull request with this change.

@jhnwllr
Copy link
Author

jhnwllr commented Mar 19, 2019

#17

@azizka
Copy link
Collaborator

azizka commented Mar 28, 2019

I'll close this issue now

@azizka azizka closed this as completed Mar 28, 2019
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

No branches or pull requests

2 participants