[postgis-devel] [PostGIS] #1806: Extremely slow and CPU-intensive ST_MakeValid (ST_BuildArea) case

PostGIS trac at osgeo.org
Sun May 13 13:44:18 PDT 2012


#1806: Extremely slow and CPU-intensive ST_MakeValid (ST_BuildArea) case
----------------------+-----------------------------------------------------
  Reporter:  strk     |       Owner:  strk         
      Type:  defect   |      Status:  closed       
  Priority:  high     |   Milestone:  PostGIS 2.0.1
 Component:  postgis  |     Version:  2.0.x        
Resolution:  fixed    |    Keywords:               
----------------------+-----------------------------------------------------

Comment(by aperi2007):

 >I believe that if the user wants to manually edit a polygon (with a GUI
 for
 >instance), she can always go back to the original geometry.

 This is true only in theory.

 If you have an invalid geometry and you would edit it.
 You need to transform it in a valid geometry otherwise every operation
 will end with an exception.

 So , you need to transform the geometry in a valid geometry to edit it
 with successfull.
 But if the ST_MakeValid lost some vertex you cannot never recreate the
 really geometry but only a more simply not always really true geometry.

 Think for example at this sample:

 {{{
  -----------------
 |                 |
 |     -------     |
 |    |       |    |
 |     -------     |
 |                 |
  -----------------
 }}}

 Ad a garden with an hous in the middle. :)

 You you see instead this:


 {{{
  -----------------
 |                 |
 |                 |
 |                 |
 |                 |
 |                 |
  -----------------
 }}}


 You see a gently lone and isolated garden.
 who say you that there was originally an house in the middle ?
 :)

 So ok, your algorithm is more rapid, but rapid is not always a giood
 strategy if it mean lost something that could has a cost to retrieve.

 Instead if you see
 {{{
  -----------------
 |                 |
 |                 |
 |                 |  +    --------
 |                 |
 |                 |
  -----------------
 }}}

 You can understand that perhaps there was something in the middle.

 However .
 I understand this is a question that has different point of view.

 If I like to use the system only for low scales, perhaps lost something is
 not so important.

 Ok, but this mean that postgis is not so important when an user need to do
 in the bigger details.
 And so it is a gently system only for rapid and simply internet
 presentation.
 Not for big and sophisticated elaboration of data.

 Who need load something geometry on postgis before It need to work that
 geometry with something else product to repair , with some method that
 give me the real geometry don't a simplification of reality. (Perhaps
 oracle ?, Perhaps ArcGIS ?, perhaps AV3 ?. I don't know)

 But why the user cannot user postgis ?

 Response: "because postgis like to be the faster."
 And never is more fast than "throw away the vertex". :)

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1806#comment:23>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list