[Qgis-user] problems with 'geometry creator'

DelazJ delazj at gmail.com
Mon Jun 12 09:53:23 PDT 2017


Btw, giving a deeper look to the help provided in the code, I wonder if
"geom_to_wkt(line_merge(geom_from_wkt('MULTILINESTRING((0 0, 1 1),(1 1, 2
2))')))"
and especially MULTILINESTRING((0 0, 1 1),(1 1, 2 2))') is a valid
multilinestring (a multipart feature whose parts already touch themselves).
Shouldn't it be two separate linestrings?
Also, in the application function help line_merge(geometry) should instead
be line_merge(geometry1, geometry2,.., geometry n), shouldn't it?
Let me know if I'm right, in which case I can provide a PR if needed.

Regards,
Harrissou

Le lundi 12 juin 2017, DelazJ <delazj at gmail.com> a écrit :
> Hi Tobias,
>
> I'm not sure what you did is the way to get what you expected (from what
I've understood); I'd not be that confident on your process (note that I
don't mean your result is false).
>
> Line_merge function like most of the expression functions in QGIS (except
aggregate ones) works feature by feature, meaning that it processes only
the geometry you provide in the bracket and, in your expression, afaict,
you simply provide the existing geometry (of each feature) --> this might
actually return the same geometry. So it won't merge your five features
into one, be it line or multi linestring.
>
> As mentioned by Matthias, virtual layer or collect option in aggregate
function (which I think is a 3.0 feature - didn't test it though) might be
the solution if you want a single feature.
>
> That said, doesn't the Symbol levels option (
http://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#symbols-levels)
already solve your issue?
> Looks like your change is simply for a better rendering/join of lines and
it's what this option is designed for...
>
> HTH,
> Harrissou
>
> Envoyé depuis mon HTC
>
> ----- Reply message -----
> De : "Tobias Wendorff" <tobias.wendorff at tu-dortmund.de>
> Pour : "Matthias Kuhn" <matthias at opengis.ch>
> Cc : <qgis-user at lists.osgeo.org>
> Objet : [Qgis-user] problems with 'geometry creator'
> Date : lun., juin 12, 2017 01:23
>
> Hi Matthias,
>
> Am So, 11.06.2017, 12:25 schrieb Matthias Kuhn:
>>
>> Sometimes - if you are lucky - they even produce better
>> results for you than trying random things.
>
> got it working - my MultiLinestring was buggy.
> So it wasn't "random trying", but an input error.
>
> Best regards,
> Tobias
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170612/ca5a0027/attachment.html>


More information about the Qgis-user mailing list