Closed etiennebacher closed 7 months ago
Yup! A less similar name may be good! Any suggestions?
A few things that make this different. We're building a library that integrates with the authorization process in arcgisutils
so you can use different ways of authorizing. Additionally, this will not only support the free/public world geocoder, but any custom locator services that one might have deployed on their own on-premises ArcGIS Enterprise.
Some other things worth noting
httr2::req_perform_parallel()
serde_json
library making it incredibly fast and memory efficient. sf
so results are returned as sf objects and input location
s are to be sfc_POINT
objects enabling you to use and return projected coordinates without performing any transformationsmagicKey
This package is dedicated to being as performant as reasonably possible. For a comparison of speed try the following:
locs <- sf::st_centroid(sfdep::guerry$geometry) |>
sf::st_set_crs(27572)
coords <- locs |>
sf::st_transform(4326) |>
sf::st_coordinates()
bench::mark(
`r-arcgis` = arcgeocode::reverse_geocode(locs),
`community` = arcgeocoder::arc_reverse_geo(
x = coords[,1],
y = coords[,2]
),
check = FALSE
)
#> # A tibble: 2 × 13
#> expression min median `itr/sec` mem_alloc `gc/sec` n_itr n_gc total_time result memory time gc
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl> <int> <dbl> <bch:tm> <list> <list> <list> <list>
#> 1 r-arcgis 955.2ms 955.2ms 1.05 2.96MB 1.05 1 1 955.2ms <NULL> <Rprofmem [2,312 × 3]> <bench_tm [1]> <tibble>
#> 2 community 42.4s 42.4s 0.0236 6.8MB 0.0236 1 1 42.4s <NULL> <Rprofmem [5,239 × 3]> <bench_tm [1]> <tibble>
There are a number of very nice utilities in arcgeocoder that I think should be incorporated at some point. For example the spatial reference object would be very handy! And the parsed categories is frankly very impressive because the json is....quite something
Thanks for the details, and indeed the perf improvements are quite impressive! Might be worth reaching out to the maintainer of arcgeocoder
to see if merging the two might be worth it to reduce confusion? But that's out of my scope for sure.
A less similar name may be good! Any suggestions?
arcgeo
? Would be straight to the point and reduces the confusion. I think it's good to have something explicit for this.
Naming is hard, I understand why you went for arcgeocode
😄
I think we will change the name to arcgisgeocode
to fit with arcgisutils
and arcgislayers
. It is a lot of characters! But it will be imported via arcgis
?? So hopefully people won't have to namespace it? Lol
Sounds good to me! Not sure if I should close this so I'll let you do it when you prefer
I'll close :) thank you
Hi @JosiahParry, you probably already know it but there's another package called
arcgeocoder
that seems to do more or less the same thing as this package (based on a cursory glance at the README). Are there some differences between the two? If so, you might want to highlight them in the README.Also, it might be worth having a slightly different name for this package since it could lead to confusion (I only suggest you change the name because I think this package is younger than the other one).
Anyway, just my 2 cents, cheers :)