Skip to content

Getting Council Data

techieshark edited this page Nov 17, 2014 · 6 revisions

The city of Mesa stores data in ESRI's ArcGIS Online platform.

The city's council districts are one of a number of geographic datasets available (click MesaCouncilDistricts, then query at the link above).

To get all districts, we

  • set the Where field to DISTRICT IS NOT NULL,
  • set the "Output Spatial Reference" field to '4326' to fetch the results in the GeoJSON default CRS of WGS 84 (aka EPSG:4326). You'll see this as the outSR parameter in the URL.
  • at the bottom of the form, set the format to JSON

After clicking the QUERY (GET) button at the bottom of the page we're given the data in the browser window and the browser address bar shows us the URL we can use at a later time, on the command line, to fetch the same data:

wget "
https://services2.arcgis.com/1gVyYKfYgW5Nxb1V/ArcGIS/rest/services/MesaCouncilDistricts/FeatureServer/0/query?where=DISTRICT+IS+NOT+NULL&outSR=4326&f=pjson"

You'll notice a similar address in config.js.

Note also that f=pjson means we want a format of pretty-printed json. We could just as well use json as the format.

See also: ESRI ArcGIS Query documention