Skip to content

Commit

Permalink
address json conversion bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahParry committed Jul 11, 2024
1 parent 8db0da7 commit d9dcac8
Show file tree
Hide file tree
Showing 12 changed files with 608 additions and 73 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"r.lsp.promptToInstall": false
}
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# arcgisutils (development version)

# arcgisutils 0.3.0
- addresses a bug where integers were encoded as floats. This caused a problem for using `update_features()` and specifying the OID field

# arcgisutils 0.3.0

- All geometry conversion functions: `as_esri_geometry()`, `as_esri_features()`, `as_esri_featureset()`, `as_features()` and `as_featureset()` have been rewritten from the ground up using Rust and extendr.
- `arcgisutils` now requires Rust to build from source
Expand Down
10 changes: 8 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
output: github_document
format: gfm
---
# arcgisutils <img src="man/figures/logo.svg" align="right" height="139" alt="" />

<!-- badges: start -->
[![R-CMD-check](https://github.com/R-ArcGIS/arcgisutils/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/R-ArcGIS/arcgisutils/actions/workflows/R-CMD-check.yaml)
Expand All @@ -17,11 +18,16 @@ knitr::opts_chunk$set(
)
```

# arcgisutils

arcgisutils is designed as the backbone of the [`{arcgis}`](https://github.com/r-arcgis/arcgis) meta-package.

arcgisutils is a developer oriented package that provides the basic functions to build R packages that work with ArcGIS Location Services. It provides functionality for authorization, Esri JSON construction and parsing, as well as other utilities pertaining to geometry and Esri type conversions.
arcgisutils is a developer oriented package that provides the basic functions to build R packages that work with ArcGIS Location Services. It provides functionality for:

- authorization,
- Esri JSON construction and parsing,
- structuring ArcGIS REST API requests,
- Esri type conversions,
- among other utilities

## Installation

Expand Down
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@

# arcgisutils <img src="man/figures/logo.svg" align="right" height="139" alt="" />

<!-- badges: start -->

[![R-CMD-check](https://github.com/R-ArcGIS/arcgisutils/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/R-ArcGIS/arcgisutils/actions/workflows/R-CMD-check.yaml)
[![CRAN
status](https://www.r-pkg.org/badges/version/arcgisutils.png)](https://CRAN.R-project.org/package=arcgisutils)
status](https://www.r-pkg.org/badges/version/arcgisutils)](https://CRAN.R-project.org/package=arcgisutils)
<!-- badges: end -->

# arcgisutils

arcgisutils is designed as the backbone of the
[`{arcgis}`](https://github.com/r-arcgis/arcgis) meta-package.

arcgisutils is a developer oriented package that provides the basic
functions to build R packages that work with ArcGIS Location Services.
It provides functionality for authorization, Esri JSON construction and
parsing, as well as other utilities pertaining to geometry and Esri type
conversions.
It provides functionality for:

- authorization,
- Esri JSON construction and parsing,
- structuring ArcGIS REST API requests,
- Esri type conversions,
- among other utilities

## Installation

Expand Down Expand Up @@ -50,6 +54,9 @@ library(arcgisutils)
#> The following object is masked from 'package:base':
#>
#> %||%
```

``` r

tkn <- auth_client()

Expand All @@ -59,7 +66,7 @@ arc_token()
#> <httr2_token>
#> token_type: bearer
#> access_token: <REDACTED>
#> expires_at: 2024-05-02 14:22:45
#> expires_at: 2024-07-11 09:40:56
#> arcgis_host: https://www.arcgis.com
```

Expand All @@ -78,7 +85,7 @@ arc_token("A")
#> <httr2_token>
#> token_type: bearer
#> access_token: <REDACTED>
#> expires_at: 2024-05-02 14:22:45
#> expires_at: 2024-07-11 09:40:56
#> arcgis_host: https://www.arcgis.com
```

Expand All @@ -95,7 +102,7 @@ arc_base_req(host)
#> GET https://www.arcgis.com
#> Body: empty
#> Options:
#> • useragent: 'arcgisutils v0.2.0.9002'
#> • useragent: 'arcgisutils v0.3.0'
```

### Esri JSON
Expand All @@ -109,6 +116,9 @@ convert to json, it is recommended to use
``` r
library(sf)
#> Linking to GEOS 3.11.0, GDAL 3.5.3, PROJ 9.1.0; sf_use_s2() is TRUE
```

``` r

nc <- st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
nc_json <- as_featureset(nc)
Expand Down
Loading

0 comments on commit d9dcac8

Please sign in to comment.