Skip to content

Instantly share code, notes, and snippets.

@rossbernet
rossbernet / ArcGIS cost distance
Last active February 20, 2017 16:38
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
@rossbernet
rossbernet / fruits.json
Created February 24, 2017 19:06
fruits
var apple = {'color: 'red', 'name: 'apple'};
var bannana = {'color: 'yellow', 'name: 'bannana'};
var pear = {'color: 'green', 'name: 'pear'};
var fruits = [apple, bannana, pear]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import ee
ee.Initialize()
# Get a download URL for an image.
image1 = ee.Image('srtm90_v4')
path = image1.getDownloadUrl({
'scale': 30,
'crs': 'EPSG:4326',
'region': '[[-120, 35], [-119, 35], [-119, 34], [-120, 34]]'
Goal: Create a web-based weighted raster overlay using open source tools.
- In the easiest way possible. For a small dataset. In Python
Why:
1. To learn how this type of analysis might be performed now.
2. Practice Python and open source tools
3. Understand limitations when datasets get to be too large
@rossbernet
rossbernet / current tools.md
Last active March 14, 2017 14:56
Some research on python for future directions of GeoTrellis

There are a number of libaries that support Raster processing in Python.

Most notable:

  1. NumPy
  2. SciPy
  3. Rasterio
  4. ArcPy
  5. Google Earth Engine
  6. MrGEO
  7. GDAL
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rossbernet
rossbernet / GeoPySpark Pseudo code MVP.py
Last active April 19, 2017 14:19
Recreating the libya weighted raster overlay app in python
from pyspark import RDD
from geopyspark.context import GeoPyContext
gsc = GeoPyContext(
master = "local[*]"
appName = "libya-demo"
)
## Load GeoJSON using Shapley
# TODO: use real shapley syntax