[Qgis-developer] Add ST_MakeValid functionality to QgsGeometry?

Andrea Peri aperi2007 at gmail.com
Thu Sep 20 03:16:53 PDT 2012


>Hi Larry,
>
>On Mon, 17. Sep 2012 at 14:15:42 -0600, Larry Shaffer wrote:
>>* Recently there have been several labeling-related issues where the*>>* conclusion is that a label is not shown because the geometry is*>>* invalid (generally polygons). I noticed Sandro Santilli's work for*>>* PostGIS 2.0 with the new ST_MakeValid function [0]. I'm no geometry*>>* whiz, but it appears to be based solely off of GEOS (and some other*>>* PostGIS internals).*>
>The functionality is in PostGIS.  It just uses GEOS calls, but the
>actual fixing is done in PostGIS (in lwgeom_geos_clean.c).
>
>But we could adapt the code there for inclusion in QgsGeometry.
>
>
>Jürgen

The code for ST_MAkeValid is in the LibWGeom library of postgis .
The libwgeom is a portable library.
This mean is is usable and compilable without all the postgis environmnet.

as an exaple of libwgeom usage:
The new release of "Spatialite 4.0" will take advantage from this
capability of the libwgeom and will support ALL" the functions availables
in the libwgeom.
As the ST_MAkeValid and other really useful functions as the snaptogrid and
the AsX3D, and so on.

I'm using the spatialite 4.0 and gain most from its superb capability to
Collect and union of geometries.
Of course this is also thx to the use of the actually trunked geos 3.4.0.
And with the MakeValid on spatialite 4.0 I'm resolving my invalid geometis
(I'm really happy now)

But, please notice, that the ST_MakeValid however need almost the geos
3.3.0 to work.

And actually in the osgeo-setup there is available only an older geos 3.2.0.
AFAIK The ST_MakeValid don't work with the geos 3.2.0.

Regards,


-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120920/3e74583b/attachment.html>


More information about the Qgis-developer mailing list