• Stars
    star
    212
  • Rank 186,122 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 10 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Convert ArcGIS Server Dynamic Map Service to GeoJSON and Shapefile

AGStoShapefile by TannerGeo

A command line tool for backing up ArcGIS Server REST Services to file.

AGStoShapefile is a node.js script that will convert Esri map services (Geoservices REST API) to GeoJSON and optionally Shapefile formats. This script will export all features and is not limited to max feature limits. AGStoShapefile can be used to cache your map services, store data for offline viewing, or used to build applications using a more simple GeJSON format.

Dependencies

If you wish to download files as Shapefile, you will need to install the following:

  1. You will need to install node.js with NPM. This script only runs on node versions 6.x.
  2. Install and setup GDAL Windows - Mac/Linux

Instructions

  • Create a services.txt to include the services you wish to query

You can install via NPM

    npm install agsout -g

Or, optionally, download and install from local

    npm install . -g

Run the script

    agsout --help
    agsout -s ./services.txt -o ./backupdir -S
    #-s location of services text file
    #-o directory to backup services
    #-S optional shapefile output (requires gdal)

Arguments

This command line script accepts 3 Arguments:

  • -s -> Location to services.txt file (see below for example)
  • -o -> Location to output directory to put files
  • -S -> OPTIONAL Output shapefile, will output geojson as well by default

for services.txt - use format [service_endpoint]|[title]|[throttle in ms]. Take note of the PIPE (|) symbol and new line.

 //example services.txt file
 http://test.service/arcigs/rest/flooding/MapServer/0|Flooding_Layer|0
 http://test.service/arcigs/rest/flooding/MapServer/1|Earthquake_Layer|5000
 http://test.service/arcigs/rest/flooding/MapServer/2|Tornado_Layer|

The throttle is helpful for very large extracts where servers may reject too many requests. The throttle number is in milliseconds.

help

Please contact TannerGeo for questions or assistance.

More Repositories

1

classybrew

Classybrew is a utility for generating statistical class breaks in your data and applying colorbrewer theory to you color palette.
HTML
37
star
2

weathertinturf

Visualize weather patterns with turf.js and NOAA NCDC weather.
JavaScript
20
star
3

state_images.json

US States and beautiful images in a JSON file
JavaScript
17
star
4

ArcGISThumbnailBuilder

Thumbnail Builder for ArcGIS Online
HTML
5
star
5

geobuf-example

Example consuming geobuf protocol buffer in Open Layers map
JavaScript
3
star
6

AGOLUserBackup

Backup ArcGIS Online Users to a SQLite Database
JavaScript
3
star
7

natl-park-gallery

Pull Flickr images for map extent and park bounds.
JavaScript
2
star
8

laravel-arcgis-auth

Laravel login using OAuth 2.0 from ArcGIS Online
PHP
2
star
9

clean-query-params

Removes query parameters from a URL with empty values
JavaScript
2
star
10

backuparcgis-item

Async module to backup items from ArcGIS Online hosted feature services to FileGDB.
JavaScript
2
star
11

ember-esri-esm

Testing ESM build of Esri JSAPI within Ember Application
JavaScript
1
star
12

pdxgames

Hackathon around PDX.Games for name.com
Ruby
1
star
13

node-xmas

Control christmas tree lights with arduino + node + express + socket.io
HTML
1
star
14

ReverseGeocodeWidget

Reverse geocoding widget for ESRI's web app builder version 2.0.
JavaScript
1
star
15

TannerGeo

Site pages for TannerGeo homepage and blog. Built with Jekyll.
CSS
1
star
16

GeoSign

Unique hash signatures for geospatial data verification
JavaScript
1
star
17

backuparcgis-service

Async module to backup content from ArcGIS Online hosted feature services.
JavaScript
1
star