Quantcast
Channel: George MacKerron: code blog » GIS
Browsing all 10 articles
Browse latest View live

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 Article



Simple 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 Article

Overlapping 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 Article

Approximating 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 Article

Polygons 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 Article


Spindlytext: 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 Article

How 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 Article

Using 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 Article


Sunrise 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 Article


Map 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
Browsing all 10 articles
Browse latest View live




Latest Images