Note: This post was mostly written in early June. Summer has been busy.

As part of my attempts to increasingly leverage PostGIS into my workflow, I’ll be posting some pretty basic how-to’s so I can better understand geoprocessing with SQL. One of the most rudimentary geoprocessing tasks is to construct a buffer. So I figured I’d tackle this one first.

CartoDB Academy’s PostGIS in CartoDB Lesson: Show Buffers

The practice dataset

I grabbed this volcano csv from the Humanitarian Data Exchange and imported it into my CartoDB account.

Input Volcano Point Dataset:

cartdob_buffer_1

The simply query to show points is:

SELECT * FROM volcano

Volcano Point Dataset with 100 mile buffer:

cartdob_buffer_2

So that query is:

SELECT
	ST_Buffer(
		the_geom_webmercator,
		100*1609
		) AS the_geom_webmercator,
	cartodb_id
FROM
	volcano

Next up will be Convex Hulls…