Skip to content

Commit

Permalink
fix crs testing logic for new sf version, closes #62
Browse files Browse the repository at this point in the history
  • Loading branch information
jsta committed Mar 23, 2020
1 parent a831846 commit 3b63645
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# nhdR 0.5.2
# nhdR 0.5.3

* Update URL endpoint for NHDPlus
* Fix crs tests for upcoming sf release

# nhdR 0.5.2

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ test_that("toUTM works", {
st_transform(gull$sp$NHDWaterbody, 4326),
st_transform(sunapee$sp$NHDWaterbody, 4326))

expect_equal(get_utm_zone(st_crs(toUTM(gull$sp$NHDWaterbody))),
expect_true(get_utm_zone(st_crs(toUTM(gull$sp$NHDWaterbody))) ==
"16")

big_combined <- rbind(
st_transform(sunapee$sp$NHDWaterbody, 4326),
st_transform(gull$sp$NHDWaterbody, 4326))

expect_equal(st_crs(toUTM(sunapee$sp$NHDWaterbody)),
expect_true(st_crs(toUTM(sunapee$sp$NHDWaterbody)) ==
st_crs(toUTM(big_combined)))

})

0 comments on commit 3b63645

Please sign in to comment.