Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Enhance covers() #49

Open
mhugo opened this issue Apr 24, 2014 · 3 comments
Open

Enhance covers() #49

mhugo opened this issue Apr 24, 2014 · 3 comments
Milestone

Comments

@mhugo
Copy link
Contributor

mhugo commented Apr 24, 2014

The implementation of Covers() is very naive. It is used internally to "cleanup" geometries after splitting them into geometry sets.
There must be ways to have a better covers implementation, especially one that do not use constructions, but only predicates

@danielcu888
Copy link
Contributor

@mhugo @lbartoletti this is of particular interest as the algorithm is particularly expensive and frequently used. Consequently, I am currently looking into this issue. If there has been any more progress please can it be posted here? Thanks.

@sloriot
Copy link
Contributor

sloriot commented Jun 24, 2020

What is Covers() doing (input -> output) ?

@danielcu888
Copy link
Contributor

It effectively checks that for two geometries A and B, covers(A,b) checks if the intersection of A and B is "equal" to B. The equality check is done using comparisons of point count, segment lengths, surface areas, solid volume, where appropriate, according to the dimension of the inputs. The todo in the implementation suggests the following improvement as indicated in the ticket description:

// // This is a very naive (not efficient) implementation of covers() ! // // covers(A,B) <=> A inter B == B // '==' is here implemented with comparison of length, area and volumes // TODO use only predicates if possible

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants