Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

Cartographic tricks and tips– making text readable, PostGIS edition

Posted by smathermather on June 29, 2013

Recall from previous post, http://wp.me/phWh4-qm I played a bit with using convex polygons and buffers to control noisy backgrounds behind text, ala:

image010

golf_orig ——–>golf_final

I was tired of doing this in the GUI in QGIS, so I wrote some simple code to do it in PostGIS.

CREATE TABLE cm_label_cvx AS
WITH buffer_cvx AS (
    SELECT ST_Buffer(ST_ConvexHull(geom), 250) AS geom FROM cm_label_med)
    SELECT ST_Union(geom) FROM buffer_cvx;

One Response to “Cartographic tricks and tips– making text readable, PostGIS edition”

  1. […] Cartographic tricks and tips– making text readable, PostGIS edition […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: