Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

What is the center line of a complex polygon? (cont. again!)

Posted by smathermather on January 14, 2012

I didn’t remember that I had 4 previous post on this topic, but I’ve gotten a little obsessed with this problem– how to (with relatively little computational cost) kind the centerline of complex polygons, so we can extract flow lines from streams, label long complex polygons, easily generate the centerline parcel boundary line for river bound parcels, etc..  FYI, here are my 4 previous posts on this topic:

scale axis transform 2
scale axis transform 1

previous post


I’ll confess, I became somewhat enamored of the scale axis transform as a method for tackling this problem.  In short, the scale axis transform identifies the medial axis of the polygon using Amenta and Kolluri’s finite union of balls to identify the initial centerline of the polygon, and then tries to fix the deficiencies in the robustness of the medial axis.

The problem, of course, is the degree to which bumps in the shape result in extra little lines hanging off our medial axis.  This does not represent an intuitive medial axis.  This is not what we would (in this case) call the centerline of the stream.

The scale axis transform suggests expanding these balls by a multiplicative factor, and deriving the new axis from that scaled version:

This step can easily be done in PostGIS once you have the medial axis:

CREATE TABLE rr_expand_r3_12 AS

ST_Buffer(b.the_geom, ST_Distance(b.the_geom, ST_Union(a.the_geom)) * 1.2 )
FROM medial_axis b, polyline a
GROUP BY <a href="" target="_blank"></a>, b.the_geom

I will play a bit more with this, but the initial results I got around areas with islands (torus like topology) were disappointing.  Also, at least as I have this implemented in PostGIS, this is a computationally intensive process.  I think though that I have a good (enough) alternative, which will be the topic of my next post.

One Response to “What is the center line of a complex polygon? (cont. again!)”

  1. […] Tags Analysis ArcGIS ArcINFO BASH Camera Calibration CartoDB CLUSTER Contours Database Database Optimization DEM Digital Surface Model Ecological Land Type Ecological Modeling FOSS GDAL GeoExt Geoserver GeoWebCache GIS labeling Leaflet LiDAR Maplex McNab OpenLayers Porro-Koppe PostGIS Postgre PostgreSQL POV-Ray povray Shell Scripting SLD SQL styled layer descriptor Technical Terrain Correction Tomcat Topographic Classification Topographic Position Triggers Vector Symbolization Viewshed Windows Command Prompt « What is the center line of a complex polygon? (cont. again!) […]

Leave a Reply

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

You are commenting using your 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: