Skip to content

Commit

Permalink
if NULL crs return NA
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahParry committed Nov 21, 2024
1 parent e848558 commit e9500a0
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BugReports: https://github.com/R-ArcGIS/arcpbf/issues
Encoding: UTF-8
Language: en
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Config/rextendr/version: 0.3.1.9000
SystemRequirements: Cargo (Rust's package manager), rustc >= 1.70
Suggests:
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export(process_pbf)
export(read_pbf)
export(resp_body_pbf)
export(resps_data_pbf)
importFrom(rlang,"%||%")
useDynLib(arcpbf, .registration = TRUE)
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# arcpbf (development version)

* Handles missing CRS and closes <https://github.com/R-ArcGIS/arcpbf/issues/11> h/t @elipousson for reporting
* Returns warning message when `esriFieldBlob` is encountered <https://github.com/R-ArcGIS/arcpbf/issues/6>
* Fixes bug where an error occured when a query returned no rows <https://github.com/R-ArcGIS/arcpbf/issues/8>

Expand Down
3 changes: 2 additions & 1 deletion R/post-process.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ post_process_list <- function(x, use_sf) {

# helper function to determine which component of the spatialReference needs
# to be passed to sf::st_crs() to create the spatial reference object
#' @importFrom rlang %||%
crs <- function(sr) {
possible_crs <- sr[c("latest_wkid", "wkid", "wkt")]
valid_crs_idx <- which(!is.na(possible_crs))[1]
possible_crs[[valid_crs_idx]]
possible_crs[[valid_crs_idx]] %||% NA
}
23 changes: 23 additions & 0 deletions man/arcpbf-package.Rd

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

5 changes: 3 additions & 2 deletions man/httr2.Rd

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

0 comments on commit e9500a0

Please sign in to comment.