Hi,

The WKT for a linestring should look like this. 

LINESTRING (30 10, 10 30, 40 40)

I think you should use geom_from_wkt, no «  to » but if I follow your logic, it 
should probably be make_linestring or something like that.
> 
> geom_to_wkt
> (
>     make_line...
> 


If you send me a few lines of your file, I will test it out for you. 

https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/functions_list.html?highlight=geom_from_wkt#geom-from-wkt

Nicolas Cadieux

> Le 14 nov. 2020 à 07:53, L.W. <[email protected]> a écrit :
> 
> 
> I tried a lot ...
> 
> I have a point-layer, I put this code in symbol -> single symbol -> 
> geometrygenerator
> 
> What is wrong? Hi 
> 
> 
> 
> geom_to_wkt
> (
>     make_line
>     (
>         make_point
>         (
>             5826542.703128459,
>             797907.3304607988
>         ),
>         make_point
>         (
>             5827473.536854242,
>             796987.0074038045
>         ),
>         make_point
>         (
>             5827167.893279332,
>             795128.2317764781
>         ),
>         make_point
>         (
>             5826835.7783904355,
>             793227.8583700341
>         )
>     )
> )
> 
> 
> Am 13.11.2020 um 15:24 schrieb Andreas Neumann:
>> Hi Nicolas,
>> 
>> Yes - but that doesn't magically turn a "non geometry" table into a 
>> "geometry table" - as far as I know. So you probably need to create a 
>> "Virtual Layer" and create the geometry similar to what you propose.
>> 
>> Andreas
>> 
>> Am 13.11.20 um 15:22 schrieb Nicolas Cadieux:
>>> Hi,
>>> You can create a geometry from WKT if you have x and y fields using and 
>>> expression in the field calculator.
>>> geom_from_wkt('POINT('||"x"||' '||"y"||')')
>>> 
>>> https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
>>> 
>>> Nicolas Cadieux
>>> 
>>>> Le 13 nov. 2020 à 09:07, Andreas Neumann <[email protected]> a écrit :
>>>> 
>>>> 
>>>> Hi
>>>> 
>>>> Neither GeometryGenerators nor Vector Field Markers work on tables without 
>>>> geometry, unfortunately. You didn't inform us, that you don't have 
>>>> geometry in your table.
>>>> 
>>>> You can, however, create a "Virtual Layer" and write some SQL to create a 
>>>> geometry from your attributes: menu "Layer" --> "Create Layer" --> "New 
>>>> Virtual Layer" - where you can use your existing tables and create a new 
>>>> geometry column with SQL. See 
>>>> https://docs.qgis.org/testing/en/docs/user_manual/managing_data_source/create_layers.html#creating-virtual-layers
>>>> 
>>>> Or, if your table is a CSV file, then you can assign attribute columns to 
>>>> a point geometry and then just hide the point rendering if you don't need 
>>>> it.
>>>> 
>>>> This is an unfortunate limitation of QGIS, that there is no "easy" way to 
>>>> add a geometry column to table that doesn't have geometry (or if it is 
>>>> possible, then I don't know it).
>>>> 
>>>> Hope this helps you,
>>>> 
>>>> Andreas
>>>> 
>>>> Am 13.11.20 um 14:52 schrieb L.W.:
>>>>> Does it works on Layers with no geometry?
>>>>> 
>>>>> My layers do not have a geometry.
>>>>> 
>>>>> 
>>>>> 
>>>>> Am 13.11.2020 um 11:56 schrieb Andreas Neumann:
>>>>>> Yes, you need point data to start from, but then vectors can bei/are 
>>>>>> generated from the attributes you mentioned.
>>>>>> 
>>>>>> Andreas
>>>>>> 
>>>>>> Am 13.11.20 um 11:47 schrieb L.W.:
>>>>>>> from the docs ...
>>>>>>> 
>>>>>>> ****It can only be used to render point data****
>>>>>>> 
>>>>>>> 12.2.2.2.6. The Vector Field Marker
>>>>>>> 
>>>>>>> The vector field marker is used to display vector field data such as 
>>>>>>> earth deformation, tidal flows, and the like. It displays the vectors 
>>>>>>> as lines (preferably arrows) that are scaled and oriented according to 
>>>>>>> selected attributes of data points. ****It can only be used to render 
>>>>>>> point data****; line and polygon layers are not drawn by this symbology.
>>>>>>> 
>>>>>>> The vector field is defined by attributes in the data, which can 
>>>>>>> represent the field either by:
>>>>>>> 
>>>>>>> cartesian components (x and y components of the field)
>>>>>>> or polar coordinates: in this case, attributes define Length and Angle. 
>>>>>>> The angle may be measured either clockwise from north, or 
>>>>>>> Counterclockwise from east, and may be either in degrees or radians.
>>>>>>> or as height only data, which displays a vertical arrow scaled using an 
>>>>>>> attribute of the data. This is appropriate for displaying the vertical 
>>>>>>> component of deformation, for example.
>>>>>>> The magnitude of field
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> Am 13.11.2020 um 11:34 schrieb Andreas Neumann:
>>>>>>>> Or even easier: use the "Vector Field Marker": 
>>>>>>>> 
>>>>>>>> https://docs.qgis.org/3.10/en/docs/user_manual/style_library/symbol_selector.html?#the-vector-field-marker
>>>>>>>>  
>>>>>>>> 
>>>>>>>> Am 13.11.20 um 11:33 schrieb Andreas Neumann: 
>>>>>>>>> Hi, 
>>>>>>>>> 
>>>>>>>>> Yes - you can use Geometry Generators for that. Use the make_point() 
>>>>>>>>> and make_line() expressions for that. 
>>>>>>>>> 
>>>>>>>>> See 
>>>>>>>>> https://docs.qgis.org/3.10/en/docs/user_manual/style_library/symbol_selector.html?highlight=geometry%20generator#the-geometry-generator
>>>>>>>>> 
>>>>>>>>> Greetings, 
>>>>>>>>> Andreas 
>>>>>>>>> 
>>>>>>>>> Am 13.11.20 um 11:26 schrieb L.W.: 
>>>>>>>>>> Hi, 
>>>>>>>>>> 
>>>>>>>>>> is it possible to draw automatically a line between two points 
>>>>>>>>>> defined 
>>>>>>>>>> by 4 fields (x1,y1 - x2,y2) in an attributetable? 
>>>>>>>>>> 
>>>>>>>>>> but I do not want to add a line-layer based on this table nor want 
>>>>>>>>>> to 
>>>>>>>>>> draw the line by hand. 
>>>>>>>>>> 
>>>>>>>>>> thanks 
>>>>>>>>>> 
>>>>>>>>>> _______________________________________________ 
>>>>>>>>>> Qgis-user mailing list 
>>>>>>>>>> [email protected] 
>>>>>>>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user 
>>>>>>>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user 
>>>>>>>>> _______________________________________________ 
>>>>>>>>> Qgis-user mailing list 
>>>>>>>>> [email protected] 
>>>>>>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user 
>>>>>>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user 
>>>>>>>> _______________________________________________ 
>>>>>>>> Qgis-user mailing list 
>>>>>>>> [email protected] 
>>>>>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user 
>>>>>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> Qgis-user mailing list
>>>>>>> [email protected]
>>>>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Qgis-user mailing list
>>>>>> [email protected]
>>>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Qgis-user mailing list
>>>>> [email protected]
>>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> [email protected]
>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> 
>> 
>> _______________________________________________
>> Qgis-user mailing list
>> [email protected]
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> _______________________________________________
> Qgis-user mailing list
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to