Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

Cleaning PostGIS Geometries — Revised

Posted by smathermather on September 19, 2011

In a previous post:

“Another short post. Got self intersecting geometries? Want to fix them inside PostGIS? Me too. Fortunately, someone has already written the code, so you and I don’t have to:

http://linfiniti.com/2010/07/cleaning-geometries-inside-postgis/

Now, let’s see how long it takes to run on my 760,000 record landcover table… .”

 

As usual, there’s a better way.  With PostGIS 2.0, you can (will be able to) use ST_MakeValid.  As a (soon to be) native function, it should be pretty fast.  See Paul Ramsey’s FOSS4G presentation:  http://s3.opengeo.org/postgis-power.pdf

 

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: