forked from libgeos/geos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GeometryCollection: Cache properties to avoid O(n) lookups
- Loading branch information
Showing
2 changed files
with
77 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -248,6 +248,19 @@ class GEOS_DLL GeometryCollection : public Geometry { | |
|
||
bool hasCurvedComponents() const override; | ||
|
||
struct CollectionFlags { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dbaston
Author
Owner
|
||
bool flagsCalculated : 1; | ||
bool hasPoints : 1; | ||
bool hasLines : 1; | ||
bool hasPolygons : 1; | ||
bool hasM : 1; | ||
bool hasZ : 1; | ||
bool hasCurves : 1; | ||
}; | ||
|
||
mutable CollectionFlags flags; | ||
|
||
void setFlags() const; | ||
|
||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is the storage cost for this?
I guess it's incurred for every collection object, right?