Skip to content

Commit b337a3e

Browse files
committed
Update README.md
1 parent 348a135 commit b337a3e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ $ arcgis-get http://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Legisl
5454
```
5555
The utilitiy downloads in batches of 1000, so while this will only need to hit the API once, the resulting file would be rather large.
5656

57+
You can also download multiple layers into the same file from the command line. For example, if you wanted to combine the Tennessee congressional districts for the 114th and 113th congress into the same file:
58+
59+
```bash
60+
$ arcgis-get http://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Legislative/MapServer 0 12 --where="STATE = 47" --layer_name_field='source_layer' > ca_distrcits_2013_2014.geojson
61+
```
62+
5763
# API
5864
## Constructor
5965
The ArcGIS() constructor takes only one argument, the URL to the web services endpoint you wish to query.
@@ -126,21 +132,21 @@ If you install [geojsonio-cli](https://github.com/mapbox/geojsonio-cli/), you ca
126132
npm install -g geojsonio-cli
127133
```
128134

129-
Then, we could re-do the previous query:
135+
Then, we could re-do the query on Hawaii's congressional districts:
130136

131137
```bash
132-
arcgis-get http://tigerweb.geo.census.gov/arcgis/rest/services/Basemaps/CommunityTIGER/MapServer 9 | geojsonio
138+
$ arcgis-get http://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Legislative/MapServer 0 --where="STATE = 15" | geojsonio
133139
```
134140

135141
And get some glorious mapped output:
136-
![geojsonio-example](https://cloud.githubusercontent.com/assets/20067/4998565/6be2e4f8-69a7-11e4-8aa1-d735bd1a7dac.png)
142+
![hawaii](https://cloud.githubusercontent.com/assets/20067/5095404/85de3610-6f37-11e4-8658-d769a89590a9.png)
137143

138-
You can also do WHERE filtering from the command line. For example, if you want to get the Census' state shape for just Florida
139-
and display it on geojson.io, you could do:
144+
Or, for example, if you want to get the Census' state shape for just Florida and display it on geojson.io, you could do:
140145

141146
```bash
142147
arcgis-get --where="NAME = 'Florida'" http://tigerweb.geo.census.gov/arcgis/rest/services/Basemaps/CommunityTIGER/MapServer 28 | geojsonio
143148
```
149+
144150
![florida](https://cloud.githubusercontent.com/assets/20067/5001808/ee233ff6-69c7-11e4-9c3e-245aba847bb5.png)
145151

146152
# Potential pitfalls

0 commit comments

Comments
 (0)