This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mapnik | |
from shapely.geometry import * | |
class StaticMap: | |
srs = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs' | |
wgs = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' | |
stylesheet = 'REA_Bright_Local.xml' | |
markername = 'rea.png' | |
exportpath = 'output/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-executionpolicy -executionpolicy remotesigned | |
winrm quickconfig -q | |
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="512"}' | |
winrm set winrm/config '@{MaxTimeoutms="1800000"}' | |
winrm set winrm/config/service '@{AllowUnencrypted="true"}' | |
winrm set winrm/config/service/auth '@{Basic="true"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Calls the Arc GIS server. | |
/// </summary> | |
/// <param name="URI">The URI.</param> | |
/// <param name="response">The response.</param> | |
static public void CallArcGISServer(string URI, out JObject response) | |
{ | |
Stream data = null; | |
StreamReader reader = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Notes on how to install a missing module from PostgreSQL | |
#Download and Postgresql (no need to make install because we already have it..): | |
#pre-requisites | |
sudo apt-get install gcc | |
sudo apt-get install libreadline-dev | |
sudo apt-get install zlib1g-dev | |
wget http://ftp.postgresql.org/pub/source/v9.3.0/postgresql-9.3.0.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Id": "Policy1389052986005", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1389052982765", | |
"Action": [ | |
"s3:GetObject" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:s3:::muppets-mapping-data/SA1_2011_AUST_CENTROID.csv", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--shp2pgsql -s 4326 -d -I 'SSC_2011_AUST.shp' 'SSC' | psql -d gis -h localhost -U simonhope | |
--shp2pgsql -s 4326 -d -I 'POA_2011_AUST.shp' 'POA' | psql -d gis -h localhost -U simonhope | |
--update the data types | |
ALTER TABLE SSC ALTER COLUMN SSC_CODE TYPE NUMERIC USING SSC_CODE::INTEGER; | |
ALTER TABLE POA ALTER COLUMN POA_CODE TYPE NUMERIC USING POA_CODE::INTEGER; | |
--explode multipolygons to single parts | |
CREATE TABLE POA_EXPLODE AS | |
SELECT |