jlacko / RCzechia

A package providing Czech shapefiles - LAU & NUTS regions, municipalities, rivers etc. - in R friendly format for analysis & visualization
https://rczechia.jla-data.net
Other
24 stars 6 forks source link

upcoming sf / s2 breaks RCzechia #33

Closed edzer closed 3 years ago

edzer commented 3 years ago

While rev dep checking, I see this:

Package: RCzechia
Check: tests
Old result: OK
    Running ‘testthat.R’
New result: ERROR
    Running ‘testthat.R’
  Running the tests in ‘tests/testthat.R’ failed.
  Last 13 lines of output:
    Loading required package: sf
    Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
    ══ Skipped tests ═══════════════════════════════════════════════════════════════
    • On CRAN (8)

    ══ Failed tests ════════════════════════════════════════════════════════════════
    ── Failure (test-1-data-structures.R:238:3): městské části ─────────────────────
    all(st_is_valid(casti())) is not TRUE

    `actual`:   FALSE
    `expected`: TRUE 

    [ FAIL 1 | WARN 0 | SKIP 8 | PASS 191 ]
    Error: Test failures
    Execution halted

indicating that you may have geometries that are not valid on the sphere. st_make_valid may help (for testing, use sf from github, branch sf_1_0 and s2 1.0.5 from CRAN). Let me know if we can help; also do visit https://github.com/r-spatial/sf/issues/1649

jlacko commented 3 years ago

Thanks for letting me know! I will check and prepare a new set of the data objects.

A slight complication is that I need to follow a least common denominator path (PROJ less than 6.0.0 etc.) but I am sure I will manage.

Is there a release schedule? Meaning a deadline?

edzer commented 3 years ago

One week.

jlacko commented 3 years ago

Oki, I will make a one off release then / and not mix it with other "useful, but not urgent" stuff.

Thanks again for letting me know!

jlacko commented 3 years ago

the good ol' water of life - "%>% st_buffer(0)", meaning creating new geometry from old - seems to have done the trick.

jlacko commented 3 years ago

I was able to 1) reproduce the failing behaviour and 2) resolve it in dev version; all is well.

v1.7.1 will be submitted to CRAN later this week, subject to the standard checks.