Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

Archive for September, 2013

New PostGIS book, on its way…

Posted by smathermather on September 28, 2013

I have posted about this previously, but just a reminder that I am working (with dedicated and brilliant co-authors) on a PostGIS book! Publication date TBD, but we are not far off now. It will be via Packt, and likely a title like “PostGIS Cookbook” or similar.

bridge over the maumee

Like many great projects, reviewing it at editing time is revealing that it is better than it felt in the writing– this will be a very nice addition to the canon (I can say that since only 4 of the chapters are mine, right? So it’s not bragging, right?… ).

It has been hard to write a great book that would complement and extend the existing canon, but also stand on its own. I think this one does a nice job of it. Since it is a recipe driven book, a lot of focus has been placed on practical examples. But, if you’ve been reading my blog, you know that beyond practical examples are practical examples with unexpected twists, and the occasional advanced and esoteric technique which has really great applications.

So stay tuned. Great things to come.

Also, pro-tip– never write a book with a full-time job and two children under the school age.  Never.  Unless you have to.  My family can’t wait for me to be done… .

Posted in PostGIS, PostgreSQL | Tagged: , , , | Leave a Comment »

More work– i.e. a little node and on a little ubuntu

Posted by smathermather on September 11, 2013

Continuing a previous post, I have been exploring the use of for an easy to deploy way for folks to edit geojson.  For my purposes this led to a dive into node.

Getting node to run well on ubuntu is not as easy as:

sudo apt-get install node

Nope, tried that. Better to use/get a newer version of node. For this we turn to PPAs (Personal Package Archives).

Install Node:

sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

Now get our

git clone git://

Now we need to leverage nodes package management. comes with a “shrinkwrap” file called package.json which tells the package manager the dependencies. thus the install command is simple:

sudo npm install 

Don’t use the -g flag above– the makefile expects relative paths for the dependencies.

Then we use make to minify the javascript, etc:


and serve with ahem serve:

sudo npm install -g serve 

Now we can run a quick test of it served up using serve

sudo serve -p 80 

A deeper dive will customize this for our launch, but this is enough to test the basic frameworks for getting running.

Extra note– as far as I can tell, there’s some Jekyll magic going on too, so it maybe simple to post this on github as well.

Anyone gotten any further with this? Any tips and tricks?

Posted in Formats, GeoJSON, github, Governance | Tagged: , , , | Leave a Comment »