open-city / chicago-river-sewage

Is there sewage in the Chicago River?
http://istheresewageinthechicagoriver.com
29 stars 12 forks source link

extract data from ARCgis map #21

Closed derekeder closed 10 years ago

derekeder commented 10 years ago

@sbeslow found a pretty interesting map on Arcgis.com: http://www.arcgis.com/home/webmap/viewer.html?webmap=756e5356baff4a74898e97f571e9d58c

screen shot 2014-02-18 at 9 31 54 pm

@mapmeld figured out how to extract a json layer of this map. I grabbed it and saved it at https://github.com/open-city/chicago-river-sewage/blob/cso-charting/data/arcgis_layers.json

derekeder commented 10 years ago

We want to extract 'Chicago Area Waterway System' and 'Combined Sewer Overflows' for starters.

The problem with the json data, is its in IL state plane coordinates. I don't think there's a simple way too to convert it to friendly geojson, so we'll have to write a script that uses OGR to convert it.

fgregg commented 10 years ago

Great find!

You probably want something like:

ogr2ogr -f "GeoJSON" all_schools_ll.geojson all_schools.geojson -s_srs EPSG:102671 -t_srs EPSG:4326 mv all_schools_ll.geojson all_schools.geojson

On Tue, Feb 18, 2014 at 9:43 PM, Derek Eder notifications@github.comwrote:

We want to extract 'Chicago Area Waterway System' and 'Combined Sewer Overflows' for starters.

The problem with the json data, is its in IL state plane coordinates. I don't think there's a simple way too to convert it to friendly geojson, so we'll have to write a script that uses OGR to convert it.

— Reply to this email directly or view it on GitHubhttps://github.com/open-city/chicago-river-sewage/issues/21#issuecomment-35463261 .

773.888.2718 2231 N. Monticello Ave Chicago, IL 60647

fgregg commented 10 years ago

CSO's are extracted here https://github.com/open-city/chicago-river-sewage/tree/cso-charting/data/processors/river-viewer

@mapmeld can you explain how you extracted the arcgis_layers.json file?

derekeder commented 10 years ago

The source url is: http://www.arcgis.com/sharing/rest/content/items/756e5356baff4a74898e97f571e9d58c/data?f=json

My understanding is @mapmeld inspected the network traffic when the page loaded. Looks like you can take the unique identifier (in this case its 756e5356baff4a74898e97f571e9d58c) for any arcgis.com map and plug it in to ttp://www.arcgis.com/sharing/rest/content/items/{UNIQUE_ID}/data?f=json

fgregg commented 10 years ago

Cool. Some useful stuff might be here too: http://gispub.mwrd.org/arcgis/rest/services

Couldn't find anything specific to CSOs.

fgregg commented 10 years ago

Done