[postgis-devel] Validity flag

Hugo Mercier hugo.mercier at oslandia.com
Mon Feb 29 01:36:54 PST 2016


Hi all,

Following the Paris code sprint, I've proposed a pull request that
allows to manipulate a validity flag in geometries and use it in SFCGAL:

https://github.com/postgis/postgis/pull/99

First about the flag: it seems we now have the whole flag byte
populated. It then means there is no room for future flags ? Could we
keep a spare flag for an "extended" flag byte if needed someday ?

Then about the pull request, here are the main changes which I would
like to have your feelings on:

- There is a new ST_HasValidityFlag() function that allows to ... well
read the validity flag.

- Modifying the flag is only possible through ST_Validate which tests
for validity and returns the input geometry with the flag set (only on
SFCGAL side for now)

- If we want to benefit from the validity flag, functions that output
new geometries should flag them valid if they are. This has been done
for some functions in the upcoming SFCGAL release. If not, functions
that need valid geometries in input should, as usual, verify validity
before processing.

Hugo



More information about the postgis-devel mailing list