May be tested against test dataset provided by werner macho and Giovanni Manghi? <br><br>On Tuesday, 24 November 2015, Matthias Kuhn <<a href="mailto:matthias@opengis.ch">matthias@opengis.ch</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Thank you Marco,<br>
<br>
Are you confident that these are the only places that need changes,
so does this mean that there is no more reason for a warning and we
just need a quick point release?<br>
I applied the same to processing and did some changes to your fix to
make it work also for union and clip.<br>
<br>
Regards<br>
Matthias<br>
<br>
<div>On 11/24/2015 04:58 PM, Neumann,
Andreas wrote:<br>
</div>
<blockquote type="cite">
<p>Thank you Marco! Much appreciated.</p>
<p>Andreas</p>
<p>On 2015-11-24 16:36, Marco Hugentobler wrote:</p>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div>Hi all<br>
<br>
I had a detailed look with the debugger at what happens in the
different versions. It turned out fTools does indeed handle
geometry collections, but assumed a geometry collection has
wkb type 'unknown' (which was true <= 2.8, but now geometry
collections are not unknown anymore). Commit <a href="https://github.com/qgis/QGIS/commit/594fafe73b80d91d94b962c2e51aea0b0168a08a" target="_blank"></a><a href="https://github.com/qgis/QGIS/commit/594fafe73b80d91d94b962c2e51aea0b0168a08a" target="_blank">https://github.com/qgis/QGIS/commit/594fafe73b80d91d94b962c2e51aea0b0168a08a</a>
should solve the issue and bring back the old behaviour.<br>
<br>
Regards,<br>
Marco<br>
<br>
<br>
<br>
On 24.11.2015 11:29, Marco Hugentobler wrote:</div>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div>On 24.11.2015 11:13, Matthias
Kuhn wrote:</div>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">Hi Marco<br>
<br>
<div>On 11/24/2015 11:01 AM, Marco
Hugentobler wrote:</div>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div>Hi Alessandro, Matthias<br>
<br>
>Is there no requirement for multi types?<br>
<br>
Afaik, the problem for f-tools are not the multi types,
but only the geometry collections (containing geometries
with different shape type). In my experience, if geos
returns a geometry collection, it usually contains one
'expected' geometry and the others are slivers (@strk,
please correct me if wrong).</div>
</blockquote>
<br>
I was mostly thinking about collections that contain a
multitype with several parts which are not considered
slivers. This seems to be a very valid scenario.</blockquote>
<br>
It is, but it was also not handled by f-tools <= 2.8.<br>
<br>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0"><br>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div><br>
>Based on what indicator should be chosen what to
extract? Try polygons first, if there are none try
lines, if there are none take points? <br>
<br>
One possibility would be to pass the expected shapetype
(Point / Line / Polygon) to the function and take the
best candidate (e.g. longest line, largest polygon
area).</div>
</blockquote>
<br>
Before the geometry changes, the algorithms were able to
provide the results without this additional information. How
was that done?</blockquote>
<br>
Not sure. Maybe the logic in the geos -> QgsGeometry
conversion handled the collections differently.<br>
<br>
<br>
Regards,<br>
Marco<br>
<br>
<br>
<br>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0"><br>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div><br>
>How much effort (in time) do you think is required
to implement this fix?<br>
<br>
Difficult to estimate. It seems straightforward to
implement the extraction function. Then it needs to be
called by the f-tools internally and be tested with a
few examples. If unit tests are required (as mentioned
by Alessandro), this seems to be the most time consuming
task to me. </div>
</blockquote>
Unit Tests for processing are on my todo list anyway (I
think as a psc member you should have voted for that ;) )<br>
<br>
Matthias<br>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div><br>
Regards,<br>
Marco<br>
<br>
On 24.11.2015 10:42, Matthias Kuhn wrote:</div>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">Hi Marco<br>
<br>
Good to have your feedback, you probably know the
problem best.<br>
<br>
<div>On 11/24/2015 09:28 AM,
Marco Hugentobler wrote:</div>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div>Hi<br>
<br>
>ad issue 1: update fTools to warn users when
some features cause problems<br>
>ad issue 2: quick fix fTools to convert geometry
collections to single geometry types<br>
<br>
A function that takes a geometry type and extracts
the longest line / the largest polygon / the first
point from the geometry collection should be
straightforward to do.</div>
</blockquote>
<br>
Is there no requirement for multi types?<br>
Based on what indicator should be chosen what to
extract? Try polygons first, if there are none try
lines, if there are none take points?<br>
<br>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div><br>
>These fixes/updates would be made available as
fTools updates via the plugin installer asap<br>
<br>
If the fix does not take too long, we probably don't
need a warning at all.</div>
</blockquote>
<br>
How much effort (in time) do you think is required to
implement this fix?<br>
<br>
Regards,<br>
Matthias<br>
<br>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div> <br>
Regards,<br>
Marco<br>
<br>
On 23.11.2015 21:35, Anita Graser wrote:</div>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div dir="ltr">
<div class="gmail_default">Hi,</div>
<div class="gmail_default"> </div>
<div class="gmail_default">If you are following
the psc list, you've probably seen the thread
discussing current shortcomings of ftools (<a href="http://lists.osgeo.org/pipermail/qgis-psc/2015-November/003623.html" target="_blank"></a><a href="http://lists.osgeo.org/pipermail/qgis-psc/2015-November/003623.html" target="_blank">http://lists.osgeo.org/pipermail/qgis-psc/2015-November/003623.html</a>)</div>
<div class="gmail_default"> </div>
<div class="gmail_default">In short, the key
issues are:</div>
<div class="gmail_default">1. When ftools
encounter issues with certain features, warning
messages get written to the log but this is
largely hidden from users since they would
actively have to actively monitor the log. The
problematic features are then missing from the
results but this is not always obvious. </div>
<div class="gmail_default">2. The above issue is
more common now (since 2.10) since underlying
libraries more often (and correctly so) produce
geometry collections as outputs. These geometry
collections are not handled well by the current
ftools code which is much older.</div>
<div class="gmail_default"> </div>
<div class="gmail_default">To address these
issues, the following suggestions have been made
so far: <br>
ad issue 1: update fTools to warn users when
some features cause problems<br>
ad issue 2: quick fix fTools to convert geometry
collections to single geometry types</div>
<div class="gmail_default"> </div>
<div class="gmail_default">For the warnings,
there's already a first PR draft <a href="https://github.com/qgis/QGIS/pull/2432" target="_blank"></a><a href="https://github.com/qgis/QGIS/pull/2432" target="_blank">https://github.com/qgis/QGIS/pull/2432</a>
which needs to be fleshed out. </div>
<div class="gmail_default"> </div>
<div class="gmail_default">These fixes/updates
would be made available as fTools updates via
the plugin installer asap. </div>
<div class="gmail_default"> </div>
<div class="gmail_default">If you have ideas how
to handle this efficiently or have already
implemented code that addresses similar issues,
let us know. </div>
<div class="gmail_default"> </div>
<div class="gmail_default">It would be good to
have a quick discussion in order to be able to
provide improvements fast.</div>
<div class="gmail_default"> </div>
<div class="gmail_default">Best wishes,</div>
<div class="gmail_default">Anita</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Qgis-developer mailing list
<a href="javascript:_e(%7B%7D,'cvml','Qgis-developer@lists.osgeo.org');" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<br>
<pre>--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
<a href="javascript:_e(%7B%7D,'cvml','marco.hugentobler@sourcepole.ch');" target="_blank">marco.hugentobler@sourcepole.ch</a> <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a>
Technical Advisor QGIS Project Steering Committee </pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Qgis-developer mailing list
<a href="javascript:_e(%7B%7D,'cvml','Qgis-developer@lists.osgeo.org');" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<pre>--
Matthias Kuhn
OPENGIS.ch - <a href="https://www.opengis.ch" target="_blank">https://www.opengis.ch</a>
Spatial • (Q)GIS • PostGIS • Open Source</pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Qgis-developer mailing list
<a href="javascript:_e(%7B%7D,'cvml','Qgis-developer@lists.osgeo.org');" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<br>
<pre>--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
<a href="javascript:_e(%7B%7D,'cvml','marco.hugentobler@sourcepole.ch');" target="_blank">marco.hugentobler@sourcepole.ch</a> <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a>
Technical Advisor QGIS Project Steering Committee </pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Qgis-developer mailing list
<a href="javascript:_e(%7B%7D,'cvml','Qgis-developer@lists.osgeo.org');" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<pre>--
Matthias Kuhn
OPENGIS.ch - <a href="https://www.opengis.ch" target="_blank">https://www.opengis.ch</a>
Spatial • (Q)GIS • PostGIS • Open Source</pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Qgis-developer mailing list
<a href="javascript:_e(%7B%7D,'cvml','Qgis-developer@lists.osgeo.org');" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<br>
<pre>--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
<a href="javascript:_e(%7B%7D,'cvml','marco.hugentobler@sourcepole.ch');" target="_blank">marco.hugentobler@sourcepole.ch</a> <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a>
Technical Advisor QGIS Project Steering Committee </pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Qgis-developer mailing list
<a href="javascript:_e(%7B%7D,'cvml','Qgis-developer@lists.osgeo.org');" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<br>
<pre>--
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
<a href="javascript:_e(%7B%7D,'cvml','marco.hugentobler@sourcepole.ch');" target="_blank">marco.hugentobler@sourcepole.ch</a> <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a>
Technical Advisor QGIS Project Steering Committee </pre>
<br>
<div style="margin:0;padding:0;font-family:monospace">_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','Qgis-developer@lists.osgeo.org');" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p> </p>
<div> </div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Qgis-developer mailing list
<a href="javascript:_e(%7B%7D,'cvml','Qgis-developer@lists.osgeo.org');" target="_blank">Qgis-developer@lists.osgeo.org</a>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<pre cols="72">--
Matthias Kuhn
OPENGIS.ch - <a href="https://www.opengis.ch" target="_blank">https://www.opengis.ch</a>
Spatial • (Q)GIS • PostGIS • Open Source</pre>
</div>
</blockquote><br><br>-- <br>Luigi Pirelli<br><br>**************************************************************************************************<br>* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com<br>* LinkedIn: <a href="https://www.linkedin.com/in/luigipirelli" target="_blank">https://www.linkedin.com/in/luigipirelli</a><br>* Stackexchange: <a href="http://gis.stackexchange.com/users/19667/luigi-pirelli" target="_blank">http://gis.stackexchange.com/users/19667/luigi-pirelli</a><br>* GitHub: <a href="https://github.com/luipir" target="_blank">https://github.com/luipir</a><br>* Mastering QGIS: <a href="https://www.packtpub.com/application-development/mastering-qgis" target="_blank">https://www.packtpub.com/application-development/mastering-qgis</a><br>**************************************************************************************************<br>