-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
SymbolixAU
committed
Sep 22, 2018
1 parent
0353c16
commit 0e8097d
Showing
5 changed files
with
68 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Package: geojsonsf | ||
Type: Package | ||
Title: GeoJSON to Simple Feature Converter | ||
Version: 1.1.00001 | ||
Date: 2018-05-25 | ||
Version: 1.1.00002 | ||
Date: 2018-09-22 | ||
Authors@R: c( | ||
person("David", "Cooley", ,"[email protected]", role = c("aut", "cre")) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,8 @@ | ||
## Release Summary | ||
|
||
* Updates v1.0 to v1.1 | ||
* Removed dependencies on undeclared packages from unit tests, as per CRAN request - email "CRAN packages maintained by you" from Kurt Hornik, 2018-05-18 (https://cran.r-project.org/web/checks/check_results_geojsonsf.html) | ||
* Updates v1.1 to v1.2 | ||
* fixed bug in handling `Date` and `Posix` clases | ||
* Build Note - Fedora clang & gcc : installed size is 5.5mb / 6.8mb | ||
- The builds says the `libs` file is 3.7mb/5.0mb. I can't reduce this file size, all the compiled c++ headers and files are required. | ||
* New gcc compiler warning : https://www.stats.ox.ac.uk/pub/bdr/gcc8/geojsonsf.out | ||
- this warning references the souce C++ library `rapidjson`. There is an issue on their github page to fix this (https://github.com/Tencent/rapidjson/issues/1205). I will update this package once rapidjson has fixed this warning. | ||
|
||
## Test Environments | ||
|
||
* local OS X 15.6.0 (High Sierra) install, R 3.5.0 | ||
* travis-ci (ubuntu 14.04.5, R Under development r74781) | ||
* win-builder (devel and release) | ||
|
||
|
||
## R CMD check results | ||
|
||
* ERRORS : 0 | ||
* WARNINGS : 0 | ||
* NOTES : 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
context("datatypes") | ||
|
||
test_that("r types are converted correctly", { | ||
|
||
# character, integer, numeric, logical, posixct, posixlt, date | ||
js <- '{"type":"Point","coordinates":[0,0]}' | ||
sf <- geojson_sf(js) | ||
sf$test <- as.Date("2018-01-01") | ||
expect_equal( | ||
geojsonsf::sf_geojson( sf ), | ||
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{\"test\":\"2018-01-01\"},\"geometry\":{\"type\":\"Point\",\"coordinates\":[0,0]}}]}" | ||
) | ||
|
||
sf$test <- as.POSIXct("2018-01-01 01:01:59") | ||
expect_equal( | ||
geojsonsf::sf_geojson( sf ), | ||
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{\"test\":\"2018-01-01 01:01:59\"},\"geometry\":{\"type\":\"Point\",\"coordinates\":[0,0]}}]}" | ||
) | ||
|
||
sf$test <- TRUE | ||
expect_equal( | ||
geojsonsf::sf_geojson( sf ), | ||
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{\"test\":true},\"geometry\":{\"type\":\"Point\",\"coordinates\":[0,0]}}]}" | ||
) | ||
|
||
sf$test <- "a" | ||
expect_equal( | ||
geojsonsf::sf_geojson( sf ), | ||
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{\"test\":\"a\"},\"geometry\":{\"type\":\"Point\",\"coordinates\":[0,0]}}]}" | ||
) | ||
|
||
sf$test <- 1L | ||
expect_equal( | ||
geojsonsf::sf_geojson( sf ), | ||
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{\"test\":1},\"geometry\":{\"type\":\"Point\",\"coordinates\":[0,0]}}]}" | ||
) | ||
|
||
sf$test <- 1.0 | ||
expect_equal( | ||
geojsonsf::sf_geojson( sf ), | ||
"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{\"test\":1},\"geometry\":{\"type\":\"Point\",\"coordinates\":[0,0]}}]}" | ||
) | ||
}) |