ropensci / c14bazAAR

R Package - Download and Prepare C14 Dates from Different Source Databases
https://docs.ropensci.org/c14bazAAR
GNU General Public License v2.0
30 stars 12 forks source link

added st_make_valid to determine_country_by_coordinates #89

Closed MartinHinz closed 4 years ago

MartinHinz commented 4 years ago

In some cases (radon), determine_country_by_coordinates results in Evaluation error: TopologyException: Input geom 1 is invalid: Ring Self-intersection at or near point ...

This can be avoided using st_make_valid to fortify the world!

codecov-io commented 4 years ago

Codecov Report

Merging #89 into master will decrease coverage by 0.51%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
- Coverage   95.44%   94.93%   -0.52%     
==========================================
  Files          30       30              
  Lines        1361     1361              
==========================================
- Hits         1299     1292       -7     
- Misses         62       69       +7
Impacted Files Coverage Δ
...ate_list_spatial_determine_country_by_coordinate.R 71.87% <100%> (ø) :arrow_up:
R/get_c14data.R 74.57% <0%> (-11.87%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6931276...f8f980c. Read the comment docs.

nevrome commented 4 years ago

Looks fine -- thank you!

Maybe lwgeom::st_make_valid() should go into line 76, so into get_world_map()?

MartinHinz commented 4 years ago

Sure thing! I just wanted to be less intrusive, but if you insist, please.

nevrome commented 4 years ago

I think this is ok - get_world_map() is only a helper. Not exported.