Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#4946 closed enhancement (fixed)

Speed up edge coverage checking in ValidateTopology

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 3.2.0
Component: topology Version:
Keywords: Cc:

Description

The invalidities we're aiming to catch are those of holes advertised to be in a different face than the one really containing them.

The current code runs an ST_Contains() against all faces in each edge's bounding box and faces intersecting it. This is very expensive.

Instead, as the EdgeRings check is already building all rings, we could

  1. Skip invalid rings
  2. For remaining *hole* rings (CW rings) find the shell (CCW ring) with smallest area containing them
  3. Compare the containing shell face id with the advertised one

Change History (3)

comment:2 by strk, 3 years ago

Resolution: fixed
Status: newclosed

I'm satisfied for now, as of commit [30aeed6904b3b74eb26c5c4cf01e0e9c53a2b3fb/git] with the speed of validating edge containment

comment:3 by Sandro Santilli <strk@…>, 3 years ago

In 63b1ea1a/git:

Further improve hole coverage speed by only comparing an hole point

References #4946

Note: See TracTickets for help on using tickets.