bcgov / bcmaps

An R package of map layers for British Columbia
http://bcgov.github.io/bcmaps/
Apache License 2.0
73 stars 17 forks source link

GEOS version number woes #71

Closed rsbivand closed 4 years ago

rsbivand commented 4 years ago

I'm trying to run sf and rgeos revdep checks with forthcoming GEOS 3.9.0, which presents itself as "3.9.0dev". This fails in old_sf_geos():

  1. Error: works with self-intersections: sf (@test-fix_geo_problems.R#94)
  2. Error: works with other problems: sf (@test-fix_geo_problems.R#106)

These fork on GEOS < 3.8.0 for good reason, but do not try to strip trailing string extensions to the declared version number. This only matters if you care about protecting yourselves from the radical changes coming in GEOS 3.9.0. Your code presupposes that the version number is normalised, which it will be when 3.9.0 is released, but then it will be too late to modify code ahead of time. The rgeos tests earlier in the same file all pass, so I think the irritant is just expecting the sf GEOS version string to be normalised.

ateucher commented 4 years ago

Thanks @rsbivand, we'll look at this and tidy up that version checking.

ateucher commented 4 years ago

@rsbivand this should be fixed now, the non-numeric version components are now converted to numeric before the comparison to v 3.8.0. Thanks for running the revdep checks and catching this!