[postgis-users] ST_MakeValid

Stephen V. Mather svm at clevelandmetroparks.com
Mon Apr 16 12:05:21 PDT 2012


> IIRC there's a difference with a multipolygon composed by two
> overlapping rectangles.

Rereading, does ST_MakeValid also test for overlapping polygons?  This would
explain the performance difference, as these polygons are pretty
complicated, and checking for overlap would not be well served by bounding
box indices.

Best,
Steve

Stephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243
svm at clevelandmetroparks.com
clevelandmetroparks.com





-----Original Message-----
From: Sandro Santilli [mailto:sandro.santilli at gmail.com] On Behalf Of Sandro
Santilli
Sent: Monday, April 16, 2012 12:41 PM
To: svm at clevelandmetroparks.com; PostGIS Users Discussion
Subject: Re: [postgis-users] ST_MakeValid

On Mon, Apr 16, 2012 at 12:33:15PM -0400, Stephen V. Mather wrote:

> Then a quick run through cleanGeometry:
...
> Query returned successfully: 1004952 rows affected, 955444 ms execution
time.
> 
> If I run as ST_MakeValid,
...
> At 2300000 milliseconds, it is still running. .

The ST_MakeValid tries its best to retain all input vertices.

IIRC there's a difference with a multipolygon composed by two
overlapping rectangles.

Also, ST_MakeValid internally checks for input validity and avoids
running anything if the input is valid. Such check has a cost too.

--strk;

  ,------o-. 
  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
  `-o------'








More information about the postgis-users mailing list