[postgis-devel] Valid geometries
Brian M Hamlin
maplabs at light42.com
Fri Jan 9 08:11:28 PST 2015
(engine_id, valid_flag) makes more sense to me than
(engine1_valid, engine2_valid, engine3_valid)
On Fri, 09 Jan 2015 12:20:25 +0100, Vincent Mora
<vincent.mora at oslandia.com> wrote:
Hi all,
>
> We have a discussion about geometry validity with Hugo Mercier on irc
> that raises questions of general interest. So here's a summary:
>
> SFCGAL function check the validity of input geometries, this takes time,
> but if we don't do it the algorithm behavior can be undefined (crash,
> infinite loop).
>
> We think that a valid geometry should have a different type than a
> geometry which validity is unknown.
>
> A validity flag could be used in postgis to implement that, with three
> possible states: valid|invalid|unknown.
>
> One issue is that geos and sfcgal (absolute prescision) may have
> different oppinion concerning the validity. Even if the geometry
> validity is well defined (SFS), checking if a point lies on a line is
> not the same thing for geos and SFCGAL: the latter tells you "it's
> 'absolutely' not on the line", the former tells you "it's really, really
> close to the line". As a result, a segment of a polygon hole touching
> the exterior ring may cause geos to consider the geometry invalid while
> SFCGAL will consider it valid. Bottom line we need two flags, more if at
> some point someone wants to add a boost backend.
>
> It would also be nice to be able to restrict a given table to store only
> valid geometries.
>
> There are alternatives: having a flag specific for SFCGAL, allowing to
> set the validation policy of SFCGAL dynamically with GUC or compiling
> SFCGAL with SFCGAL_CHECK_VALIDITY turned off. But none appeals to me as
> a specific type for valid geometries does.
>
> Which do you prefer ?
>
> V.
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
>
--
Brian M Hamlin
OSGeo California Chapter
blog.light42.com
More information about the postgis-devel
mailing list