Skip to content

Instantly share code, notes, and snippets.

@oeon
oeon / population_density_slu.md
Last active August 29, 2015 13:55
notes on population density for SLU
@oeon
oeon / gist:8741074
Created January 31, 2014 19:19
OSM Overpass Turbo query for golf course features/ways
<!--bunker-->
{{key=golf}}
{{value=bunker}}
{{key0=natural}}
{{value0=sand}}
<!--green-->
{{key1=golf}}
{{value1=green}}
{{key2=landuse}}
{{value2=grass}}
@oeon
oeon / gist:8867893
Last active August 29, 2015 13:56
add `GlobalID = ` and single quote to beginning/end of GlobalID and ' OR ' ... in Notepad++
#in Regular Expression Search Mode
Find: ^.
Replace: GlobalID = '\{
#note the space after 'OR'
Find: .$
Replace: \}' OR
#switch to Extended Search Mode, nothing is entered in the Replace field
Find: \r\n
@oeon
oeon / USA_Topo_Maps.xml
Created March 12, 2014 19:22
USA_Topo_Maps, MOBAC source
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customMapSource>
<name>USA_Topo_Maps</name>
<maxZoom>15</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>None</tileUpdate>
<url>http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{$z}/{$y}/{$x}></url>
</customMapSource>
@oeon
oeon / mapproxy.yaml
Last active August 29, 2015 14:01
MapProxy config, WMS from existing tile server
services:
demo:
tms:
use_grid_names: true
# origin for /tiles service
origin: 'nw'
kml:
use_grid_names: true
wmts:
wms:
@oeon
oeon / mapillary_api_slo_county
Created June 12, 2014 16:40
mapillary api slo county bounding box
http://api.mapillary.com/v1/im/search?min-lat=34.89&max-lat=35.8&min-lon=-121.35&max-lon=-119.47&max-results=1
@oeon
oeon / gist:95f5de141998e618cedf
Created June 19, 2014 21:57
replace string regex (working)
extract ADDRESS through ZIP from this string:
Vendor NUMBER: 14811 ADDRESS: 65 WINSLOW STREE CITY: REDWOOD CITY ST: CA ZIP: 94063 PHONE: 6505935555
regex:
(ADDRESS).*(ZIP.{7})
@oeon
oeon / openrefine-dst-notes.txt
Last active August 29, 2015 14:02
OpenRefine, Data Science Toolkit quick notes
Paul's post: http://padaba.com/dst.or/
load raw txt into google refine
check “parse next”
(I can’t get a comma between City, State)
AddrFull
cells["ADDRESS"].value+cells["CITY"].value+cells["ST"].value
www.datasciencetoolkit.org/developerdocs#vagrant
@oeon
oeon / turkey.geojson
Last active August 29, 2015 14:04
CASLU2014005868 Turkey Fire
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Install PostGIS and GeoServer on Ubuntu 13.04

PostGIS installation

Postgresql

Install the server:

sudo apt-get install postgresql-9.1 postgresql-contrib-9.1 pgadmin3

Execute the psql command under user postgres (sudo -u postgres)
and connect to database postgres (psql postgres):