Geographic Information Systems Asked by YuW on May 21, 2021
In QGIS 2.18 I have 2 layers, one is a multiline layer and the other is a point layer.
The point layer contain every endpoints of that multiline layer and saved some of the point’s own attributes.
I’d like to create 2 new fields in the multiline layer which are "start point type" and "end point type" and the type of start and end point of each line are recorded in the attribute table of point layer.
The question is that how to extract the content from other layer’s attribute table(and with different geometry type).
I’ve installed the refFunction plugin and find some function may be useful like geomequals.
Following is something I’ve try in the field calculator but not working(take start point for example).
case
when start_point($geometry) geomequals('LayerL','$geometry')
then get_feature('LayerP', 'FieldP', '')
end
LayerL is the multiline layer, LayerP is the point layer and FieldP is the field of point layer I’d like to fill in the new field.
I keep a copy of 2.18 to solve problems just like yours. Use the tool Points to Paths (note the plural Paths), which, sadly, was never ported to 3.x. This tool creates line segments from points, where the attributes from the beginning and ending points are transferred to their respective line segment. The trick is to check on the "Line per vertex" option.
Answered by Stu Smith on May 21, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP