Category: Spatial stuff

  • Reprojecting shapefiles with ogr2ogr

    If you have an ESRI Shapefile (.shp) that you want to reproject, you can use ogr2ogr ogr2ogr -t_srs newfile.shp oldfile.shp The EPSG code could be for instance epsg:28532.

  • Sticking bicycle paths in CouchDB

    In this installment of How To Stick Anything In CouchDB, I’ll take some bicycle path data released by the municipality of Copenhagen and stick them in CouchDB. As always I’m working in Terminal under Mac OS X. Bicycle paths in Copenhagen, served live by CouchDB: Your browser does not support IFRAME The data is in […]

  • Free online O’Reilly book on CouchDB

  • Using shp2geocouch to push OSM data into geocouch

    Today I installed the utility shp2geocouch on Mac OS X 1.6. First I needed to update RubyGems… sudo gem update –system Then I could install shp2geocouch sudo gem install shp2geocouch Next I downloaded OSM data for Copenhagen, Denmark wget unzip cd copenhagen.shapefiles Finally I used shp2geocouch to upload one of the shape files […]

  • Installing spatial databases on EC2

    The spatial databases covered are PostGIS, MySQL spatial and MongoDB, Apache Cassandra. UPDATE: I’ll change this post or create a page to give the actual linux commands to run on the remote server. PostGIS on EC2 I have found a nice tutorial that describes setting up Postgres on EC2 on an Ubuntu instance with all […]

  • Building osm2pgsql on Mac OS X using homebrew

    General instructions are here: Note: I’m running Snow Leopard (10.6.6 ) 1. Install homebrew Check that you don’t have it already: $ which brew If you don’t have homebrew install it from here: E.g. like this: $ ruby -e “$(curl -fsSLk” 2. Install proj $ brew install proj $ which proj /usr/local/bin/proj […]

  • How to import OpenStreetMap data into PostgreSQL

    1. Download data and software The instructions are fairly generic, so should work for both Windows, Linux and Mac OS X. I wrote them for Windows, but I’ve since then switched to Mac OS X. PostgreSQL+PostGIS I assume that you do not already have Postgres/PostGIS installed on your system. Download PostgreSQL+PostGIS for all platforms here: […]