as_kmldoc: easily visualise PostGIS queries as KML in Google Earth
PostGIS has an st_askml function. This turns geometries into fragments of KML, and thus takes you most of the way to easy visualisation of spatial queries using Google Earth. But not all the way: these...
View ArticleSimple PostGIS nearest neighbour function
Here’s a less generic and slightly different nearest-neighbour function based on Regina’s generic nearest-neighbour function at Boston GIS. It follows the same basic idea of using series of enlarging...
View ArticleOverlapping markers on your Google Map? Meet OverlappingMarkerSpiderfier
Ever noticed how, in Google Earth, marker pins that overlap each other spring apart gracefully when you click them, so you can pick the one you meant? And ever noticed how, when using the Google Maps...
View ArticleApproximating kernel-weighted proportions in PostGIS
Imagine you want compare various locations in terms of the availability of a certain type of environment, such as fresh water. You might want to use a measure of the proximity of that environment —...
View ArticlePolygons from PostGIS to Processing
There are plenty of ways to get spatial data from a PostGIS database into a Processing sketch. You can export to CSV or SVG and load it from there; you can query the database directly; or, depending on...
View ArticleSpindlytext: write in the sky with the Google Earth API
I’ve just released Spindlytext on Github. It’s the library that powers the live data display in Pigeon Sim, by creating KML linestrings in the shape of letters. It looks like this:
View ArticleHow to compile PostGIS 2.1 on Ubuntu Server 12.04+
PostGIS 2 has some exciting new goodies — including raster support — that I’m keen to use in the analysis of Mappiness data. But the PostGIS package provided by Ubuntu 12.04 is still only at version...
View ArticleUsing the OSTN02 transformation in PostGIS
When converting coordinates between WGS84 (GPS) and OSGB36 (UK National Grid), using OSTN02 can gain us a few metres in accuracy over the basic parametric transformation provided by PostGIS’s...
View ArticleSunrise and sunset times with PostGIS and PL/R
Since light can affect happiness, two important pieces of environmental data I add to the Mappiness data set during analysis are: (1) whether a response was made in daylight; and (2) day length when...
View ArticleMap algebra with callbacks in PostGIS 2.1
I’ve been playing with the much-enhanced raster support in PostGIS 2.1 in the last few days. Amongst other things I’ve been producing maps with ST_MapAlgebra, which has changed a little since 2.0. The...
View Article
More Pages to Explore .....