Skip to content

Instantly share code, notes, and snippets.

@elipousson
Created July 10, 2025 21:52
Show Gist options
  • Save elipousson/22ebec6d3b74ec412fb9d688ed996560 to your computer and use it in GitHub Desktop.
Save elipousson/22ebec6d3b74ec412fb9d688ed996560 to your computer and use it in GitHub Desktop.
# ---
# repo: elipousson/baltimoreplanning
# file: standalone-baltimore-gis.R
# last-updated: 2025-05-28
# license: https://creativecommons.org/publicdomain/zero/1.0/
# imports: [arcgisutils, arcgisgeocode]
# ---
# ## Changelog
#
# 2025-05-28:
# - Initial setup
#
# nocov start
#' Create a GeocodeServer using the Baltimore City EGIS Composite Locator
#' @noRd
egis_geocode_server <- function(
url = NULL,
token = arcgisutils::arc_token()
) {
url <- url %||%
"https://egis.baltimorecity.gov/egis/rest/services/Locator/EGISCompositeLocator/GeocodeServer"
arcgisgeocode::geocode_server(
url = url,
token = token
)
}
#' Batch Geocode Addresses using the Baltimore City EGIS Composite Locator
#' @noRd
baltimore_geocode_addresses <- function(
single_line = NULL,
...,
geocoder = egis_geocode_server()
) {
arcgisgeocode::geocode_addresses(
single_line = single_line,
...,
geocoder = geocoder
)
}
# nocov end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment