[postgis-devel] Validity flag

Olivier Courtin olivier.courtin at oslandia.com
Fri Mar 4 06:33:06 PST 2016


Le 4 mars 2016 à 14:58, Daniel Baston <dbaston at gmail.com> a écrit :

Hi Dan,

> I like the suggestion to add an optional set of extra flags at the end of the geometry, as a nice backwards-compatible way to store extra information when we need the ability.  But it seems like overkill for the current situation, where we do have flags available in the current structure.  Can we not get 99% of the benefits (avoid repeatedly testing geometries known to be valid) by storing the single "valid / unknown" flag in the current structure?

I have the same feeling (invalid flag looks like overkill),
But sooner or later we will need new flags…

And we have to face now, the following choice:
- use the last flag space left, for "valid / unknown" notion
- or use the last one for activating the extra flags handling (at the end of the geometry)
  
And if we have extra flags, we could afford more liberally to spare few, even for quite peculiar use case.
(as we could even imagine to add later an another extra 8-bytes at the end of the end and so on…)




The other alternative is to remove at least one flag who is not that meaningful (as flag)
(readonly could be a candidate ?).



> On unrelated note, do we need to further quality what we mean by "valid" ?  Is SFCGAL validity always the same as GEOS validity ?

Good question !
Depends on OGC SFS Validity notion, so should not be different upon backend (GEOS, SFCGAL, whatever)



O.


More information about the postgis-devel mailing list