Skip to content

Instantly share code, notes, and snippets.

@rossbernet
Last active February 20, 2017 16:38
Show Gist options
  • Save rossbernet/53c7b0791e28d26490fcb0f2caf8f6f5 to your computer and use it in GitHub Desktop.
Save rossbernet/53c7b0791e28d26490fcb0f2caf8f6f5 to your computer and use it in GitHub Desktop.
ArcGIS cost distance raster prep
task: create cost distance raster for each of a series of shapefile for libya using a friction layer derived from open street map road network
steps:
1. obtain street network from OSM. I got mine from here: http://download.gisgraphy.com/openstreetmap/pbf/LY.tar.bz2
then used osmosis to convert pbf to xml.
In arc...
2. reclassify road network such that roads have a value of 1 and non-roads have a value of 5. I set pixel size equal to 200m x 200m
3. Use Cost distance tool.
Input: shapefile and road friction layer.
Parameters: I set a max distance of 200,000 because processing for the whole country was too time consuming, and may not have even been useful.
4. Then I reclassified each of the resulting cost distance rasters to values of 1 - 20, inversely (such that pixel values would be higher closer to the points/lines) And would add together in a normalized fashion (maybe?)
That is 95% on the raster creation. Then Rob put them on an online server and added them together and set slidable parameters. ( I don't know what exactly he did)
Optionally:
1. I treated population centers differently to provide nuiance and take into consideration the different sized population.
As far as I can tell, there is no way to mimic the cost distance spread effect to reflect shapefile table properties.
If that isn't clear. I mean. I wanted smaller cities to look like they had a smaller impact.
To do this, I divided the population shapefile into small, medium, and large cities. (arbitrary cut offs...)
And then ran each with a different cost distance maximum. (100k, 150k, 200k)
@rossbernet
Copy link
Author

rossbernet commented Feb 18, 2017

screen shot 2017-02-17 at 10 28 14 am

I created this model in modelbuilder. It looks crazier than I just described, but it is taking into account extents to make sure they are standard, and exporting things uniformly as geotiffs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment