GEOS required for selecting nearest features not working

hello Travis CI,

I’m not being able to deal with this Travis error asking for GEOS version 3.6.1 while trying to run a unit test in a package that is using the sf::at_nearest_feature.

here is the log error:

yaml
─ 1. Error: (unknown) (@test-dwp.R#4)  ────────────────────────────────────────
GEOS version 3.6.1 required for selecting nearest features
Backtrace:
  1. genestdwp::dwp(vr = rings, pt = pto_carcass)
 10. sf::st_join(., filter(vr, visib != 0), join = st_nearest_feature)
 12. sf:::join(x, y, ...)
 13. sf:::CPL_geos_nearest_feature(st_geometry(x), st_geometry(y))
══ testthat results  ═══════════════════════════════════════════════════════════
[ OK: 1 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ]
1. Error: (unknown) (@test-dwp.R#4) 

From the looks of the log error, seems to be a dist that does not support the libgeos-3.7.1 package. I’d be curious to see what your dist: is set at? Try changing it to xenial (which I’m guessing you’re not currently using) which currently supports libgeos as there is no .travis.yml build instruction file provided, I cannot make a guess one way or another.

An example of a working .travis.yml in this case would be as follows:

language: r
cache: packages
latex: false
sudo: true
dist: xenial

Try changing the dist (if it’s not already xenial) If it is, we can troubleshoot more. My gut is telling me this is the issue.

-Montana (Travis CI Staff)

thank you @Montana, for reference here was my travis file

 latex: false
 sudo: true
 dist: trusty

with an error of:

`GEOS version 3.6.1 required for selecting nearest features`

Glad I could help @SolarUltima,

That was my gut, that it was the dist: via the support issue. If you have anymore concerns, problems, issues, I welcome you with open arms and will help you with anything you need! I’m thrilled I could resolve this as quick as I did for you.

-Montana (Travis CI Staff)