[postgis-devel] Validity flag

Sandro Santilli strk at keybit.net
Mon Feb 29 05:00:00 PST 2016


On Mon, Feb 29, 2016 at 12:45:38PM +0100, Oliver Courtin wrote:

> With only the _valid_ one , if we are sure that geometry is valid, 
> we could skip the check validity in SFCGAL (or other backend),
> and if we not sure (i.e unknown or not valid), 
> we have to do the check validity backend side.

Why check if it's already checked and invalid ?
You could just say it's invalid, right away, and
suggest to use ST_MakeValid.

BTW, ST_MakeValid checks for validity as its first thing,
making it slow when the input is already known as being
invalid. It would then also benefit from knowing _invalid_
from the start.

And ST_Simplify (for example) could set _invalid_ flag when
returning collapsed lines (structurally invalid).

--strk;



More information about the postgis-devel mailing list