[postgis-devel] SFCGAL 1.1.0 support

Vincent Mora vincent.mora at oslandia.com
Thu Jan 22 00:08:31 PST 2015


On 22/01/2015 08:04, Paragon Corporation wrote:
> Vincent,
>
> Some comments about the patch
>
> 1) For the availability part of the docs.  I noticed you put ???
>
> That should  be 2.2.0  (we won't be releasing until 2.2.0 September  so I
> think you can fit it in to the 2.2.0 release)
Ok, 2.2 for new functions it is. On another hand, the fix for the 
multisolid could fit in the next 2.1.x if there is any planed.
>
>
> 2) It seems you have added backend switchers for ST_Difference and ST_Union.
> I'm guessing that is for the same reason you override the
>
> ST_Intersection function too -- so that the SFCGAL implementations of those
> is a true 2D and not any monkey 3D in there
>
> And that the true 3D Difference and 3D Union functions are serviced by
> ST_3DUnion and ST_3DDifference?
Exact.

That makes me realize that I forgot a newly exposed functions en SFCGAL 
capi:  sfcgal_geometry_is_valid which will replace its geos counterpart 
with the sfcgal backend. But it will fit better with another set of 
changes that was discussed before (flag for valid geometries).

For the players, there is also sfcgal_set_geometry_validation(bool) in 
the SFCGAL capi, you can define a GUC to set it. Disabling validation of 
input geometries will speedup things dramatically (i.e. x rather than 
%)... but you should check the geom validity before sending them to 
SFCGAL, otherwise bad things can happen (undefined behavior), that's why 
we left out this functionality. If a dba is around and see a use for an 
admin restricted GUC, please tell me.
>
>
>
> Overall pretty excited about these changes and can't wait to get my hammer
> out to stress test them. :)
>
> Thanks,
> Regina
>   
>
> -----Original Message-----
> From: postgis-devel-bounces at lists.osgeo.org
> [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Vincent Mora
> Sent: Wednesday, January 21, 2015 1:15 PM
> To: PostGIS Development Discussion
> Subject: [postgis-devel] SFCGAL 1.1.0 support
>
> Hi all,
>
> We released SFCGAL 1.1.0 this week, and here is a patch to support it.
>
> Spoiler: the new functions are ST_3DUnion, ST_3DDifference and ST_Volume
> (and an SFCGAL backend for ST_Union, ST_Difference).
>
> This patch is not meant to be included as is, but to provide a base for
> discussion.  A summary of the modifications in the patch follows.
>
> There are parts of the patch that are bug fixes and that do not depend on
> SFCGAL 1.1.0 and can be included right away.
>
> The points that I'd most like feedback on are:
> - do we need to support older versions of SFCGAL ?
> - how to make a nice section in the doc explaining the backend mechanism ?
>
> My two cents on the first question: there is no distro provided binaries of
> SFCGAL that I'm aware of, so, since you have to recompile SFCGAL, you may as
> well recompile the new shiny one rather than an old dusty one.
>
> Thanks,
>
> V.
>
>
>
>
>
>
>
>
>
>
> Summary of the modifications in the patch (the parts specific to SFCGAL
> 1.1.0 are tagged as such):
>
>
> In liblwgeom/lwgeom_sfcgal.c
> - fix bug for conversion of multisolid (caused extruded multypolygon to
> miss the solid flag)
>
> In postgis/lwgeom_backend_api.c
> - added backend switch for difference and union *SFCGAL 1.1.0*
>
> In postgis/lwgeom_geos.h and postgis/lwgeom_geos.c
> - changed the name of difference and union *SFCGAL 1.1.0*
> - exposed those renamed functions *SFCGAL 1.1.0*
>
> In postgis/lwgeom_sfcgal.c
> - added difference, union, volume *SFCGAL 1.1.0*
> - added makesolid and issolid
>
> In postgis/sfcgal.sql.in
> - added ST_3DDifference, ST_3DUnion and ST_Volume *SFCGAL 1.1.0*
> - added ST_MakeSolid and ST_IsSolid
>
> In regress/sfcgal/concave_hull.sql
> - fixed test failure caused by insufficient tolerance *SFCGAL 1.1.0*
>
> In regress/sfcgal/empty.sql, regress/sfcgal/empty_expected,
> regress/sfcgal/regress_ogc.sql and regress/sfcgal/regress_ogc_expected
> - fixed test to avoid failure on equivalent representation of a polygon
> (different starting point for a ring) *SFCGAL 1.1.0*
>
>
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel




More information about the postgis-devel mailing list