The basic syntax for downloading a service as a shapefile using shapefile-ags is:
shapefile-ags <map_service_layer_url>
The default output .zip is named shapefile.zip
. There is an option to rename the output:
shapefile-ags <map_service_layer_url> --file-name='some_name.zip'
You can also query the service to return a subset of the data. For instance, say we only want to return Graves Rd in Scott County from the transportation service. We could write a query like this:
shapefil-ags http://gis.gscplanning.com/arcgis/rest/services/Transportation/MapServer/0 --where="FULLNAME='GRAVES RD'"
You can query and rename in the same command!
shapefil-ags http://gis.gscplanning.com/arcgis/rest/services/Transportation/MapServer/0 --where="FULLNAME='GRAVES RD'" --file-name=graves_rd.zip