<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>I have a question concerning the line_substring and recently
updated $length expressions. I have a linestring (EPSG:4326) and a
relative start- and end-offset (in %) and I want to create the sub
linestring. The start- and end distances at the line_substring
expression should be set in projection units (e.g. degrees in
EPSG:4326). With the previous behaviour of $length, I multiplied
the relative offset (in %) with the (planimetric) length to
calculate those distances. See the following example:</p>
<p>geom_to_wkt(line_substring(
geom_from_wkt('LINESTRING(13 46, 15 46)'), 0.4* $length, 0.6*
$length)) // $length => 2.0
</p>
<p>results in </p>
<p>LINESTRING(13.8 46, 14.2 46)</p>
<p>With the latest release (3.6.0-1 und 3.4.5-1), the $length
expression correctly calculates the ellipsoidal length (<a
class="moz-txt-link-freetext"
href="https://issues.qgis.org/issues/19355">https://issues.qgis.org/issues/19355</a>)
and I cannot use the above expression. Is there a way to use
relative distances in the line_substring function? Or is there an
alternative to calculate the planimetric length (without
implementing my own function)?<br>
</p>
<p>Thanks for your help</p>
<p>Simon</p>
</body>
</html>