cforlando / road-closures-map-data

Get data from the road closures map, restructure it, save it
3 stars 0 forks source link

Try getting road closure data from the ArcGIS map #2

Open csndra0504 opened 7 years ago

csndra0504 commented 7 years ago

Here is the map: http://www.arcgis.com/apps/webappviewer/index.html?id=80f863e226c948b496d27b179d924f93

Here is the Road Closure API from ArcGIS provided by matt broffman (from the city) --> http://www2.cityoforlando.net/arcgis/rest/services/Traffic_Control/Road_Closures/MapServer/1

Do these docs work for us? Can we actually get data from this map?

devdupont commented 7 years ago

I was able to get road closure data by using this URL. It returns all road closures (in JSON) within an envelope containing the city limits.

http://www2.cityoforlando.net/arcgis/rest/services/Traffic_Control/Road_Closures/MapServer/1/query?where=&text=&objectIds=&time=&geometry=%7B%0D%0A++++++++++++++++%22xmin%22%3A+519066.9112086431%2C%0D%0A++++++++++++++++%22ymin%22%3A+1520502.1260502483%2C%0D%0A++++++++++++++++%22xmax%22%3A+556428.0223197542%2C%0D%0A++++++++++++++++%22ymax%22%3A+1541668.7927169148%0D%0A%7D&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=true&returnM=true&gdbVersion=&returnDistinctValues=false&f=pjson

devdupont commented 7 years ago

The only thing that needs to change to get the different types of closure info is the int value at Road_Closures/MapServer/<int value here>/query?params

devdupont commented 7 years ago

Here's a slightly smaller version of the URL. Removed and cleaned some params. The final format param can be changed from pjson to json to save some file size.

http://www2.cityoforlando.net/arcgis/rest/services/Traffic_Control/Road_Closures/MapServer/1/query?geometry=%7B%0D%0A%22xmin%22%3A+519066.9112086431%2C%0D%0A%22ymin%22%3A+1520502.1260502483%2C%0D%0A%22xmax%22%3A+556428.0223197542%2C%0D%0A%22ymax%22%3A+1541668.7927169148%0D%0A%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&returnGeometry=true&returnIdsOnly=false&returnCountOnly=false&returnDistinctValues=false&f=pjson

csndra0504 commented 7 years ago

Great stuff @flyinactor91 Thanks!

mancxvi commented 7 years ago

Curious about how this might apply: https://blogs.esri.com/esri/arcgis/2016/10/13/waze_and_arcgis/