Skip to content

Commit

Permalink
update to CRAN version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampros committed Jan 12, 2023
1 parent 7ec7511 commit c3edeba
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 57 deletions.
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ Please include a minimal reproducible example

Please give a brief description of the problem

Please add your Operating System (e.g., Windows10, Macintosh, Linux) and the R version that you use (e.g., 3.6.2)

If my package uses Python (via 'reticulate') then please add also the Python version (e.g., Python 3.8) and the 'reticulate' version (e.g., 1.18.0)
Please add your Operating System (e.g., Windows10, Macintosh, Linux) and the R version that you use (e.g., 4.0.2)
6 changes: 3 additions & 3 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ignore-comments: true
labels-synonyms: '{"bug":["error","need fix","not working"],"enhancement":["upgrade"],"question":["help"]}'
labels-not-allowed: '["good first issue"]'
default-labels: '["help wanted"]'
labels-synonyms: '{"bug":["error","need fix","not working"],"enhancement":["upgrade"],"question":["help","how can i"]}'
labels-not-allowed: '["documentation","duplicate","good first issue","help wanted","invalid"]'
default-labels: '["triage"]'
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Package: geojsonR
Type: Package
Title: A GeoJson Processing Toolkit
Version: 1.1.0
Date: 2021-05-03
Version: 1.1.1
Date: 2023-01-12
Authors@R: c( person(given = "Lampros", family = "Mouselimis", email = "mouselimislampros@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "https://orcid.org/0000-0002-8024-1546")), person("Dropbox", "Inc", role = "cph"))
BugReports: https://github.com/mlampros/geojsonR/issues
URL: https://github.com/mlampros/geojsonR
Description: Includes functions for processing GeoJson objects <https://en.wikipedia.org/wiki/GeoJSON> relying on 'RFC 7946' <https://tools.ietf.org/pdf/rfc7946.pdf>. The geojson encoding is based on 'json11', a tiny JSON library for 'C++11' <https://github.com/dropbox/json11>. Furthermore, the source code is exported in R through the 'Rcpp' and 'RcppArmadillo' packages.
Description: Includes functions for processing GeoJson objects <https://en.wikipedia.org/wiki/GeoJSON> relying on 'RFC 7946' <https://datatracker.ietf.org/doc/pdf/rfc7946.pdf>. The geojson encoding is based on 'json11', a tiny JSON library for 'C++11' <https://github.com/dropbox/json11>. Furthermore, the source code is exported in R through the 'Rcpp' and 'RcppArmadillo' packages.
License: MIT + file LICENSE
Encoding: UTF-8
Copyright: inst/COPYRIGHTS
SystemRequirements: libarmadillo: apt-get install -y libarmadillo-dev (deb)
Depends:
Expand All @@ -22,4 +23,4 @@ Suggests:
knitr,
rmarkdown
VignetteBuilder: knitr
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

## geojsonR 1.1.1

* I modified the *json11.cpp* file by excluding the *using std::move* from the top of the file and converting all *move* to *std::move* to remove the significant warning *"warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]"*


## geojsonR 1.1.0

* I've added the *CITATION* file in the *inst* directory listing all papers and software used in the *geojsonR* package
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## geojsonR
<br>

The **geojsonR** package includes functions for processing [GeoJson objects](https://en.wikipedia.org/wiki/GeoJSON) relying on [RFC 7946](https://tools.ietf.org/pdf/rfc7946.pdf). The geojson encoding is based on [json11](https://github.com/dropbox/json11), a tiny JSON library for C++11. Furthermore, the source code is exported in R through the *Rcpp* and *RcppArmadillo* packages. More details on the functionality of geojsonR can be found in the [blog-post](http://mlampros.github.io/2017/03/29/geojsonR_package/) and in the package Vignette.
The **geojsonR** package includes functions for processing [GeoJson objects](https://en.wikipedia.org/wiki/GeoJSON) relying on [RFC 7946](https://datatracker.ietf.org/doc/pdf/rfc7946.pdf). The geojson encoding is based on [json11](https://github.com/dropbox/json11), a tiny JSON library for C++11. Furthermore, the source code is exported in R through the *Rcpp* and *RcppArmadillo* packages. More details on the functionality of geojsonR can be found in the [blog-post](http://mlampros.github.io/2017/03/29/geojsonR_package/) and in the package Vignette.
<br><br>

To install the package from CRAN use,
Expand Down Expand Up @@ -43,7 +43,7 @@ Use the following link to report bugs/issues,

### **Citation:**

If you use the code of this repository in your paper or research please cite both **geojsonR** and the **original articles / software** [https://cran.r-project.org/web/packages/geojsonR/citation.html](https://cran.r-project.org/web/packages/geojsonR/citation.html):
If you use the code of this repository in your paper or research please cite both **geojsonR** and the **original articles / software** `https://CRAN.R-project.org/package=geojsonR`:

<br>

Expand All @@ -52,7 +52,7 @@ If you use the code of this repository in your paper or research please cite bot
title = {{geojsonR}: A GeoJson Processing Toolkit},
author = {Lampros Mouselimis},
year = {2021},
note = {R package version 1.1.0},
note = {R package version 1.1.1},
url = {https://CRAN.R-project.org/package=geojsonR},
}
```
Expand Down
66 changes: 33 additions & 33 deletions man/TO_GeoJson.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// export_From_geojson
Rcpp::List export_From_geojson(std::string input_file, bool flatten_coords, bool average_coordinates, bool to_list);
RcppExport SEXP _geojsonR_export_From_geojson(SEXP input_fileSEXP, SEXP flatten_coordsSEXP, SEXP average_coordinatesSEXP, SEXP to_listSEXP) {
Expand Down
17 changes: 8 additions & 9 deletions src/json11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ using std::vector;
using std::map;
using std::make_shared;
using std::initializer_list;
using std::move;

/* Helper for representing null - just a do-nothing struct, plus comparison
* operators so the helpers in JsonValue work. We can't use nullptr_t because
Expand Down Expand Up @@ -151,7 +150,7 @@ class Value : public JsonValue {

// Constructors
explicit Value(const T &value) : m_value(value) {}
explicit Value(T &&value) : m_value(move(value)) {}
explicit Value(T &&value) : m_value(std::move(value)) {}

// Get type tag
Json::Type type() const override {
Expand Down Expand Up @@ -198,23 +197,23 @@ class JsonString final : public Value<Json::STRING, string> {
const string &string_value() const override { return m_value; }
public:
explicit JsonString(const string &value) : Value(value) {}
explicit JsonString(string &&value) : Value(move(value)) {}
explicit JsonString(string &&value) : Value(std::move(value)) {}
};

class JsonArray final : public Value<Json::ARRAY, Json::array> {
const Json::array &array_items() const override { return m_value; }
const Json & operator[](size_t i) const override;
public:
explicit JsonArray(const Json::array &value) : Value(value) {}
explicit JsonArray(Json::array &&value) : Value(move(value)) {}
explicit JsonArray(Json::array &&value) : Value(std::move(value)) {}
};

class JsonObject final : public Value<Json::OBJECT, Json::object> {
const Json::object &object_items() const override { return m_value; }
const Json & operator[](const string &key) const override;
public:
explicit JsonObject(const Json::object &value) : Value(value) {}
explicit JsonObject(Json::object &&value) : Value(move(value)) {}
explicit JsonObject(Json::object &&value) : Value(std::move(value)) {}
};

class JsonNull final : public Value<Json::NUL, NullStruct> {
Expand Down Expand Up @@ -256,12 +255,12 @@ Json::Json(double value) : m_ptr(make_shared<JsonDouble>(value)) {
Json::Json(int value) : m_ptr(make_shared<JsonInt>(value)) {}
Json::Json(bool value) : m_ptr(value ? statics().t : statics().f) {}
Json::Json(const string &value) : m_ptr(make_shared<JsonString>(value)) {}
Json::Json(string &&value) : m_ptr(make_shared<JsonString>(move(value))) {}
Json::Json(string &&value) : m_ptr(make_shared<JsonString>(std::move(value))) {}
Json::Json(const char * value) : m_ptr(make_shared<JsonString>(value)) {}
Json::Json(const Json::array &values) : m_ptr(make_shared<JsonArray>(values)) {}
Json::Json(Json::array &&values) : m_ptr(make_shared<JsonArray>(move(values))) {}
Json::Json(Json::array &&values) : m_ptr(make_shared<JsonArray>(std::move(values))) {}
Json::Json(const Json::object &values) : m_ptr(make_shared<JsonObject>(values)) {}
Json::Json(Json::object &&values) : m_ptr(make_shared<JsonObject>(move(values))) {}
Json::Json(Json::object &&values) : m_ptr(make_shared<JsonObject>(std::move(values))) {}

/* * * * * * * * * * * * * * * * * * * *
* Accessors
Expand Down Expand Up @@ -355,7 +354,7 @@ struct JsonParser final {
* Mark this parse as failed.
*/
Json fail(string &&msg) {
return fail(move(msg), Json());
return fail(std::move(msg), Json());
}

template <typename T>
Expand Down
4 changes: 2 additions & 2 deletions vignettes/the_geojsonR_package.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ vignette: >

"[GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) is an open standard format designed for representing simple geographical features, along with their non-spatial attributes, based on JavaScript Object Notation. The features include points (therefore *addresses* and *locations*), line strings (therefore *streets*, *highways* and *boundaries*), polygons (*countries*, *provinces*, *tracts of land*), and multi-part collections of these types. GeoJSON features need not represent entities of the physical world only; *mobile routing* and *navigation apps*, for example, might describe their service coverage using GeoJSON. The GeoJSON format differs from other GIS standards in that it was written and is maintained not by a formal standards organization, but by an Internet working group of developers." <br>

**geojsonR** relies mainly on [RFC 7946](https://tools.ietf.org/pdf/rfc7946.pdf), which is the new standard specification of the GeoJSON format. Moreover, the package takes advantage of a C++11 JSON library ([json11](https://github.com/dropbox/json11)) to do the encoding *from* and *to* geojson data objects and all functions are exported in R using the *Rcpp* and *RcppArmadillo* packages. <br>
**geojsonR** relies mainly on [RFC 7946](https://datatracker.ietf.org/doc/pdf/rfc7946.pdf), which is the new standard specification of the GeoJSON format. Moreover, the package takes advantage of a C++11 JSON library ([json11](https://github.com/dropbox/json11)) to do the encoding *from* and *to* geojson data objects and all functions are exported in R using the *Rcpp* and *RcppArmadillo* packages. <br>


The following lines show an [example GeoJson object](https://tools.ietf.org/pdf/rfc7946.pdf#page=5) (*"feature_collection.geojson"*),
The following lines show an [example GeoJson object](https://datatracker.ietf.org/doc/pdf/rfc7946.pdf#page=5) (*"feature_collection.geojson"*),

```{r, eval = F}
Expand Down

0 comments on commit c3edeba

Please sign in to comment.