1

What are the arguments (Line', 'id', '1') of the function

line_locate_point( geometry:=geometry(get_feature('Line', 'id', '1')), point:=$geometry)

stand for?

'Line' is obviously the name of the polyline object, where the function is applied, but where are 'id' and '1'needed for? Is it necessary that the polyline 'Line' has the field 'id', so that the polyline with the id=1 is identified and subjected to the line_locate_function? Does the function also work without an id and its respective number?

Kadir Şahbaz
  • 76,800
  • 56
  • 247
  • 389
  • 1
    You seem to read https://gis.stackexchange.com/questions/280112/points-layer-distance-from-the-start-of-line-layer-in-qgis? and there "Line" stands for the name of the layer. "Id" and value are used for selecting one exact linestring. Names must match your data so edit the layer name and the name of the unique column accordingly. – user30184 Feb 18 '23 at 13:39
  • 2
  • Hi, thanks for your answer. My polyline is named 'Pfad_PA33' an i have now added the attribute 'id' and inserted 1 in order to identify the object. When I open the field calculator in the point layer, where i like to add the field 'distance' by applying the function `line_locate_point( geometry:=geometry(get_feature('Pfad_PA33', 'id', '1')), point:=$geometry), the 'distance' field remains empty. did i still get something wrong? – Jakob_DB_EC Feb 18 '23 at 14:09
  • You need double quotes around "1" if it is a string, none if it's an integer – Kasper Feb 18 '23 at 14:22

0 Answers0