You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There will be cases where orig.coord %in% coord_original and also have no lat/lon coordinates (i.e., the gazetteer did not return any coordinates for the register). This type of register should also be considered "no_cannot_check", otherwise sf::st_as_sf(tmp, coords = c(lon, lat)) will return an error:
Error in st_as_sf.data.frame(tmp, coords = c(lon, lat)) :
missing values in coordinates not allowed
Maybe this can be solved using the argument na.fail = FALSE inside sf::st_as_sf but it doesn't seem right in my mind. It is better to add these cases as no_cannot_check too.
This can be done adding this condition to x[, orig.coord] %in% "no_coord"
# Adding the OR condition for cases where origin.coord is coord_original
# but the lon OR lat are still NA even after using the gazetteer.
# These ones need to be no_cannot_check too
ids.no.coord <- x[, orig.coord] %in% "no_coord" |
(x[, orig.coord] %in% "coord_original" & (is.na(x[lon]) | is.na(x[lat])))
The text was updated successfully, but these errors were encountered:
In
checkCoord
, lines 31-35:There will be cases where
orig.coord %in% coord_original
and also have no lat/lon coordinates (i.e., the gazetteer did not return any coordinates for the register). This type of register should also be considered "no_cannot_check", otherwisesf::st_as_sf(tmp, coords = c(lon, lat))
will return an error:Maybe this can be solved using the argument
na.fail = FALSE
insidesf::st_as_sf
but it doesn't seem right in my mind. It is better to add these cases asno_cannot_check
too.This can be done adding this condition to
x[, orig.coord] %in% "no_coord"
The text was updated successfully, but these errors were encountered: