Command-line tool and Go library for downloading data from public ArcGIS sources and converting to common geospatial formats.
go install github.com/Sudo-Ivan/arcgis-utils/cmd/arcgis-utils@latestOr download binaries from releases.
arcgis-utils -url <ARCGIS_URL> [OPTIONS]Required:
-url: ArcGIS resource URL (Feature Layer, Feature Server, Map Server, or ArcGIS Online Item)
Options:
-format: Output format (geojson,kml,gpx,csv,json,txt) - default:geojson-output: Output directory - default: current directory-select-all: Process all layers without prompting-overwrite: Overwrite existing files-skip-existing: Skip processing if output file exists-prefix: Prefix for output filenames-timeout: HTTP request timeout in seconds - default: 30-exclude-symbols: Exclude symbol information from output-save-symbols: Save symbology/images to separate folder-no-color: Disable colored output
Download a Feature Layer as GeoJSON:
arcgis-utils -url https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Time_Zones/FeatureServer/0Download all layers from a Feature Server as KML:
arcgis-utils -url https://sampleserver6.arcgisonline.com/arcgis/rest/services/EmergencyFacilities/FeatureServer -format kml -select-allProcess an ArcGIS Online Web Map:
arcgis-utils -url https://www.arcgis.com/home/item.html?id=a12b34c56d78e90f1234567890abcdef -skip-existingdocker run --rm -v $(pwd)/results:/results ghcr.io/sudo-ivan/arcgis-utils:latest -url <ARCGIS_URL> -output /resultsmakeBuild with debug symbols:
make debugCross-compile for specific platform:
make linux-amd64
make windows-amd64
make darwin-arm64See Makefile for all supported platforms.
import "github.com/Sudo-Ivan/arcgis-utils/pkg/arcgis"
client := arcgis.NewClient(30 * time.Second)
layers, err := client.FetchServiceLayers(url, "FeatureServer")MIT License