Cleaning PostGIS Geometries — Revised

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:

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:


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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.