Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if NULL crs return NA #12

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading