In case anyone is interested, I've been trying to use turf.js on both Mapbox and Mapzen vector tiles, and I've learned a few things I wish I'd known going in.
This thing I've been working on for a month or so here and there, to make maps like this:
In case anyone is interested, I've been trying to use turf.js on both Mapbox and Mapzen vector tiles, and I've learned a few things I wish I'd known going in.
This thing I've been working on for a month or so here and there, to make maps like this:
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
Detailed walk through of building extraction using postgis
First lets pull a data layer from of openstreetmap. You can do this any which way you’d like, as there are a variety of methods for pulling openstreetmap data from their database. Check the [wiki] (http://wiki.openstreetmap.org/wiki/Downloading_data) for a comprehensive list. My favourite method thus far is pulling the data straight into QGIS using the open layers plugin. For those who may want to explore this method, check [this tutorial] (http://www.qgistutorials.com/en/docs/downloading_osm_data.html). For building extraction you only need building footprints, and include the building tags. Not all polygons are of type building in OSM, so we can download all the polygons, and then filter the layer for only polygons tagged as buildings.
LiDAR data was pulled from USGS via the Earth Explorer site. [Here] (http://earthobservatory.nasa.gov/blogs/ele
This Python script utilizes the GeoPy geocoding library to batch geocode a number of addresses, using various services until a pair of latitude/longitude values are returned.
This is a non-technical reading list for technical people.
This is a list of software you should read like a novel.
##How to get started contributing to a Humanitarian OpenStreetMap Team task
###Overview
OpenStreetMap (OSM) is an open-source map of the world that anyone can edit. But like any map, it's incomplete.
The Humanitarian OpenStreetMap Team (HOT) helps organize people to improve the OSM map for crisis areas, mostly so aid workers can find their way around and make decisions about undermapped places. The data in these crisis areas is often very poor, or completely non-existent. Therefore any contribution you make at all will be a vast improvement, and could materially help people who are on the ground right now, looking at this data as you edit it, and deciding where to go and who to help.
There are many HOT tasks active at once. As of August 2014, the highest-priority tasks are Gaza and areas affected by the West African Ebola outbreak.
In general, it seems there are roughly five (5) ways to get "file data" (e.g. a GeoTIFF) out of a PostGIS geoprocessing workflow:
""" | |
Generator for packed circle cartograms | |
""" | |
import proj, gisutils | |
class Cartogram: | |
def loadCSV(self, url, key='id', value='val', lon='lon', lat='lat'): | |
import csv | |
doc = csv.reader(open(url)) |
Color Brewer: Tool created by Cynthia Brewer that offers advice for using color on maps, specifically with thematic mapping. Lets you export color schemes to various formats.
Mapshaper for generalizing your geospatial data which helps your maps not only look better but load faster. Mapshaper let's you preview how generalized it looks before you export it.
states = fl la nc ok va \ | |
al ga ma nd or vt \ | |
ar hi md ne pa wa \ | |
az ia me nh ri wi \ | |
ca id mi nj sc wv \ | |
co il mn nm sd wy \ | |
ct in mo nv tn \ | |
dc ks ms ny tx \ | |
de ky mt oh ut |