Ivan 5f0a2318c0 fix: improve error handling in tests and update regex for safe filename generation
- Added early returns in TestConvertFeatures to handle errors more gracefully.
- Updated regex in processSelectedLayer to correctly escape backslashes and whitespace.
- Removed unused helper functions from convert package to clean up the codebase.
2025-11-06 09:59:08 -06:00
2025-05-04 08:06:26 +00:00
2025-11-06 09:53:42 -06:00
2025-11-06 09:53:54 -06:00
2025-04-26 01:27:13 -05:00
2025-04-26 01:39:37 -05:00
2025-11-06 09:54:08 -06:00
2025-11-06 09:54:14 -06:00
2025-11-06 09:53:31 -06:00

arcgis-utils

Socket Badge

Command-line tool and Go library for downloading data from public ArcGIS sources and converting to common geospatial formats.

Installation

go install github.com/Sudo-Ivan/arcgis-utils/cmd/arcgis-utils@latest

Or download binaries from releases.

Usage

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

Examples

Download a Feature Layer as GeoJSON:

arcgis-utils -url https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Time_Zones/FeatureServer/0

Download all layers from a Feature Server as KML:

arcgis-utils -url https://sampleserver6.arcgisonline.com/arcgis/rest/services/EmergencyFacilities/FeatureServer -format kml -select-all

Process an ArcGIS Online Web Map:

arcgis-utils -url https://www.arcgis.com/home/item.html?id=a12b34c56d78e90f1234567890abcdef -skip-existing

Docker

docker run --rm -v $(pwd)/results:/results ghcr.io/sudo-ivan/arcgis-utils:latest -url <ARCGIS_URL> -output /results

Building

make

Build with debug symbols:

make debug

Cross-compile for specific platform:

make linux-amd64
make windows-amd64
make darwin-arm64

See Makefile for all supported platforms.

Library Usage

import "github.com/Sudo-Ivan/arcgis-utils/pkg/arcgis"

client := arcgis.NewClient(30 * time.Second)
layers, err := client.FetchServiceLayers(url, "FeatureServer")

License

MIT License

Description
CLI tool to download data from various ArcGIS sources (Feature Layers, Feature Servers, Map Servers, ArcGIS Online Items including Web Maps) and convert it to common geospatial formats.
Readme MIT 121 KiB
v1.0.0 Latest
2025-11-06 15:59:08 +00:00
Languages
Go 96.9%
Makefile 2.5%
Dockerfile 0.6%