Skip to content

Instantly share code, notes, and snippets.

@mschmidty
Created July 15, 2024 17:16
Show Gist options
  • Save mschmidty/f85361f91d1154988877f427a683b10d to your computer and use it in GitHub Desktop.
Save mschmidty/f85361f91d1154988877f427a683b10d to your computer and use it in GitHub Desktop.
library(sf)
library(arcgislayers)
con <- arc_open("https://gis.blm.gov/nlsdb/rest/services/Fluid_Minerals/Oil_Gas_Leases_Production_Status/MapServer/0")
ccng_bd <- st_read("T:\\FS\\NFS\\PSO\\MPSG\\2024_CimarronComancheNG\\1_PreAssessment\\Data\\Shapefiles\\CimarronComancheNG_AdminBdy.shp") |>
st_transform(con$sourceSpatialReference$wkid)
ccng_data <- arc_select(con, filter_geom = st_bbox(ccng_bd), page_size = 200)
st_write(ccgn_data, "whatever/output/path/you/want.gpkg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment