[postgis-devel] Validity flag
dbaston at gmail.com
Sat Mar 5 14:14:48 PST 2016
Here's an example where GEOS and SFCGAL report a different result for
SELECT ST_IsValid('POLYGON ((0 0 0, 1 0 0, 1 0 0, 1 1 0, 0 1 0, 0 0 1))');
This returns true with GEOS, but false with SFCGAL (on Hugo's branch, where
ST_IsValid is implemented with SFCGAL). So, we wouldn't want a situation
where the flag is set with a GEOS backend and read with a SFCGAL backend.
On Fri, Mar 4, 2016 at 9:33 AM, Olivier Courtin <
olivier.courtin at oslandia.com> wrote:
> 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)
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-devel