AW: Re [Qgis-developer] Planning for QGIS 1.0.0 '????
Hugentobler Marco
marco.hugentobler at karto.baug.ethz.ch
Mon Aug 4 07:51:59 EDT 2008
Hi all,
Here a bit of explanation about why the call to Polygonizer::getCutEdges is used for polygon splitting. Let's say we have a polygon with a hole inside (donut polygon) and we try to split it with a line that starts outside the polygon and ends inside the hole. This split produces a cut line and thus an invalid polygon according to the OGC simple features specification. In QgsGeometry:: splitPolygonGeometry, this case is queried with the getCutEdges function and the user receives feedback that the split fails. Without this query, the polygonizer will not add the splitting line, but the two vertices at the positions where the splitting line crosses the polygon borders are added.
So in short: Yes, this check is needed. QGIS won't crash if it is not there, but user might be confused when doing a split that creates a cut edge.
It might be best to query GEOSversion to see if getCutEdges is supported. The bug that arises if the call isn't done is not critical and will be outdated after some time.
@Jürgen:
I think it will be good to let the geos c-api patch be tested by other developers for let's say one week before applying it to trunk. I'm going to give you feedback once I did some tests with it.
Regards,
Marco
-----Ursprüngliche Nachricht-----
Von: qgis-developer-bounces at lists.osgeo.org im Auftrag von Mateusz Loskot
Gesendet: Sa 02.08.2008 13:27
An: Tim Sutton
Cc: qgis-developer at lists.osgeo.org
Betreff: Re: Re [Qgis-developer] Planning for QGIS 1.0.0 '????
Tim Sutton wrote:
> Hi
>
> 2008/8/2 Mateusz Loskot <mateusz at loskot.net>:
>
>>> So I think in the short term finding
>>> a workaround for cutedges (perhaps only calling it #ifndef GEOS_3_1
>>> or somthing) would be good.
>> You mean to wrap the new call in GEOS sources?
>
> No I meant to only do the cutedges check in qgis if we have the
> correct c-api supported geos version available on the system. We are
> awating feedback from Marco to see if this is feasible.
Tim,
I see. If you want to check it in compile time, then you can test
value of GEOS_VERSION_* macros [1]. If you want to test it in run time,
then GEOSversion [2] is handy.
[1] http://trac.osgeo.org/geos/browser/trunk/capi/geos_c.h.in
[2] http://trac.osgeo.org/geos/browser/trunk/capi/geos_c.cpp#L1462
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list