Drivetime analyses, pgRouting

We’ve got some quick and dirty pgRouting-based code up on github. I say quick and dirty because it directly references the table names in both of the functions. I hope to fix this in the future. The objective with this code is to input a point, use a nearest neighbor search to find the nearest intersection, and from that calculate a drive time alpha shape. … Continue reading Drivetime analyses, pgRouting

Plugin-free QGIS TMS tiles via GDAL

Want to load your favorite tiles into QGIS? How about a plugin-free QGIS TMS tiles via GDAL: http://www.3liz.com/blog/rldhont/index.php?post/2012/07/17/OpenStreetMap-Tiles-in-QGIS Really awesome… . Needs but one change: epsg:900913 should be epsg:3857 or QGIS (GDAL?) throws an error. Presumably you could also define epsg:900913 in some config file, but barring that create an XML file as follows, and load as a raster in QGIS: Now I can use … Continue reading Plugin-free QGIS TMS tiles via GDAL

Cleaning animal tracking data — throwing away extra points

Much the problem of the modern era– too much data, uneven data, and yet, should we keep it all? Here’s the problem space: attach GPS collar to a coyote, send that data home, and you have a recipe for gleaning a lot of information about the movement of that animal across the landscape. In order to maximize the data collected while also maximizing the battery … Continue reading Cleaning animal tracking data — throwing away extra points

The easiest way to get PostGIS and friends running:

Docker.  See: https://github.com/vpicavet/docker-pggis for a quick and easy Docker running PostGIS. Understand, this isn’t production ready (the connection permissions make my teeth hurt a little) but, so nice to have a one stop shop for postgis, pgrouting, and pointcloud. Now I may have to write blog posts on pointcloud. Point cloud didn’t get in the PostGIS Cookbook because it was too hard to build. I … Continue reading The easiest way to get PostGIS and friends running:

2.5D TINs in PostGIS

(edited: changed TIN to TIN Z) (edited again — function already exists as a flag in ST_DelaunayTriangles… .) Uh, I wrote a function for nothin’… As Regina points out in the commments, this functionality was rolled into 2.1 with a flag. Her example: For the record, my code is about 2% slower on a dataset that takes ~50minutes to triangulate . —————————————— Original Post —————————————— … Continue reading 2.5D TINs in PostGIS

More cutting room floor stuff… — 3D pyramid maker

A little more leftover code from the PostGIS Cookbook— a little tool for making pyramids for SFCGAL enabled PostGIS databases. https://github.com/smathermather/postgis-etc/blob/master/3D/pyramidMaker.sql Edit:  Actually, I think this would work without SFCGAL, but what would be the point… . Edit 2:  Let’s embed some code:   Continue reading More cutting room floor stuff… — 3D pyramid maker

More cutting room floor stuff… .

ST_3DIntersection performs volumetric intersections for us in PostGIS, if we have SFCGAL enabled for our PostGIS back end.  Much like a normal PostGIS intersection, this is the mathematical definition of an interesection, so it returns the volumetric portion of the intersection, plus 3D linestrings and 3D points and other bits and pieces that qualify for the intersection.  As a little patch, I wrote a quick … Continue reading More cutting room floor stuff… .

New PostGIS book, on its way…

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. Like many great projects, reviewing it at editing time is revealing that it is better than it felt … Continue reading New PostGIS book, on its way…