[Qgis-developer] Labels on topologically wrong polygons

Larry Shaffer larrys at dakotacarto.com
Wed Jul 24 11:24:11 PDT 2013


Hi,

On Wed, Jul 24, 2013 at 11:04 AM, aperi2007 <aperi2007 at gmail.com> wrote:

> On 24/07/2013 17:55, Larry Shaffer wrote:
>
>> I think QGIS should offer the option to on-the-fly try to fix those
>> geometries. This was discussed previously [0]
>>
>
> The MakeValid is not a fast process.
> Try to apply it on-the-fly will slow again the labelling flow.
>

Yes, but only for those features that are tested to be invalid (already
done). Also, as I noted, this should be optional, and probably disabled by
default.



> Another problem is tht it could change little , but not less important,
> part of a geometry.
> so if the user will decide to edit it .
> Instead of editing the original geometry it will edit a changed geometry.
> And save in the shapefile (o r other container) another more changed
> geometry.
>

The labeling engine sends to the backend PAL library *copies* of the
feature geometries. So, the original geometry is never edited, i.e. the
copy would be what is run through ST_MakeValid. Once the labels are
created, those copied geometries are dumped and never rendered on the
canvas.

There should probably be some logging somewhere, if the geometry is
invalid, but usually the copied geometry has been clipped to the extent
rectangle. In other words, invalid geometries of the copies at that point
have nothing to do with the original features, which may be valid. So,
logging invalids at that point doesn't make sense.


>
> Don't forgot that the original ST_MakeValid of postgis (and also
> spatialite) will return also the
> removed parts of original geometry. (point , arc or other it was)
>

This could be an issue, where a multi-geometry is return for a single
input. It seems this could be overcome with some checks, and eventually
fallback to rejecting the geometry, if necessary.



> To not lost of view the original geometry.
>

Sorry. I don't understand your meaning here.


Regards,

Larry



> ______________________________**_________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130724/a961c343/attachment.html>


More information about the Qgis-developer mailing list