<html><body><div dir="ltr" style="font-family: UICTFontTextStyleBody; font-size: 17px; color: rgb(0, 0, 0);">Hi Jakob,</div><div dir="ltr" style="font-family: UICTFontTextStyleBody; font-size: 17px; color: rgb(0, 0, 0);"><br></div><p dir="ltr" class="p1" style="text-align: left; text-indent: 0px; line-height: normal; text-transform: none; background-color: rgba(0, 0, 0, 0); margin: 0px;"><span style="font-family: UICTFontTextStyleBody; font-size: 17px; color: rgb(0, 0, 0);">You can treat this as a </span><span style="font-family: UICTFontTextStyleEmphasizedBody; font-size: 17px; color: rgb(0, 0, 0);"><b>least-cost path </b></span><span style="font-family: UICTFontTextStyleBody; font-size: 17px; color: rgb(0, 0, 0);">problem where </span><span style="font-family: UICTFontTextStyleEmphasizedBody; font-size: 17px; color: rgb(0, 0, 0);"><b>uphill movement is made extremely expensive</b></span><span style="font-family: UICTFontTextStyleBody; font-size: 17px; color: rgb(0, 0, 0);">, and downhill is cheap, so the route still heads toward your chosen end point.</span></p><p class="p1" style="text-align: left; text-indent: 0px; line-height: normal; text-transform: none; margin: 0px;"><span style="font-family: UICTFontTextStyleEmphasizedBody; font-size: 17px; color: rgb(0, 0, 0);"><b>Practical approach in QGIS: GRASS r.walk + r.drain</b></span></p><ol start="1" style="text-align: left; list-style-type: decimal;"><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleEmphasizedBody; text-transform: none;" role="presentation"><b>Prepare the DEM</b></span></li><ul style="list-style-type: disc;"><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Use a projected CRS (meters).</span></li><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Ideally run a </span><span style="font-family: UICTFontTextStyleItalicBody; text-transform: none;" role="presentation"><i>fill sinks</i></span><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation"> tool to avoid small DEM “traps”.</span></li></ul><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleEmphasizedBody; text-transform: none;" role="presentation"><b>Create a friction raster</b></span></li><ul style="list-style-type: disc;"><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">r.walk needs a friction layer; if you don’t want extra friction, use a constant raster (0 or 1 everywhere).</span></li></ul><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleEmphasizedBody; text-transform: none;" role="presentation"><b>Run GRASS r.walk</b></span></li><ul style="list-style-type: disc;"><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Elevation = DEM, Friction = constant raster</span></li><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Start = your start point</span></li><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Increase the </span><span style="font-family: UICTFontTextStyleEmphasizedBody; text-transform: none;" role="presentation"><b>uphill penalty</b></span><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation"> (the walk_coeff b parameter) so uphill becomes practically “not allowed”.</span></li></ul><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleEmphasizedBody; text-transform: none;" role="presentation"><b>Extract the line with GRASS r.drain</b></span></li><ul style="list-style-type: disc;"><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Use -d (cost-surface mode)</span></li><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Input = r.walk cost raster</span></li><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Direction = r.walk outdir raster</span></li><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Use the </span><span style="font-family: UICTFontTextStyleEmphasizedBody; text-transform: none;" role="presentation"><b>end point</b></span><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation"> as the drain location (it traces back to the start).</span></li></ul><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleEmphasizedBody; text-transform: none;" role="presentation"><b>Check the result</b></span></li><ul style="list-style-type: disc;"><li style="font-family: -apple-system, sans-serif; font-size: 17px; color: rgb(0, 0, 0); line-height: normal; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; text-transform: none;" role="presentation">Sample elevations along the line (profile tool). If you see tiny uphill bumps, increase the uphill penalty.</span></li></ul></ol><p class="p1" style="text-align: left; text-indent: 0px; line-height: normal; text-transform: none; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; font-size: 17px; color: rgb(0, 0, 0);">Note: this can behave like “no uphill”, but it’s still a penalty-based model. If you need a strict guarantee (zero uphill steps), you’d need a custom directed-graph approach (only allow moves to equal-or-lower cells), e.g. via PyQGIS/NetworkX.</span></p><p class="p1" style="text-align: left; text-indent: 0px; line-height: normal; text-transform: none; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; font-size: 17px; color: rgb(0, 0, 0);"><br></span></p><p class="p1" style="text-align: left; text-indent: 0px; line-height: normal; text-transform: none; margin: 0px;"><span style="font-family: UICTFontTextStyleBody; font-size: 17px; color: rgb(0, 0, 0);">Also worth stating: if the end point is higher than the start point, a “never uphill” path is impossible by definition.</span></p><div id="ms-outlook-mobile-body-separator-line" data-applydefaultfontstyles="true" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;" dir="ltr"><div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;"><br></div></div><div style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;" id="ms-outlook-mobile-signature"><div style="text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 14px; color: rgb(0, 0, 0);"><b>Vladimir Vuković </b></div><div style="text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0);">Author of FiberQ </div><div style="text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">  </div><div style="text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="color: rgb(17, 17, 17);"><a href="mailto:vukovicvl@fiberq.net" data-ogsc="rgb(17, 17, 17)" data-linkindex="3" style="text-decoration: none;">vukovicvl@fiberq.net</a></span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(17, 17, 17);"><a href="https://fiberq.net/" data-ogsc="rgb(17, 17, 17)" data-linkindex="4" style="text-decoration: none;">fiberq.net</a></span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(17, 17, 17);"><a href="tel:+381604262012" data-ogsc="rgb(17, 17, 17)" data-linkindex="5" style="text-decoration: none;">+381 60 426 2012</a></span></div><div dir="ltr" style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><img src="cid:signature-image-13514818-43F3-4268-BD26-7FE1DE83B5BC" alt="signatureImage" id="id-signature-image-13514818-43F3-4268-BD26-7FE1DE83B5BC" style="max-width: 100%;"></div></div><div id="mail-editor-reference-message-container"><hr style="display: inline-block; width: 98%;"><div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif;"><b>From:</b> QGIS-User <qgis-user-bounces@lists.osgeo.org> on behalf of Jakob Rabanser via QGIS-User <qgis-user@lists.osgeo.org><br><b>Sent:</b> Thursday, January 8, 2026 2:31 PM<br><b>To:</b> qgis-user@lists.osgeo.org <qgis-user@lists.osgeo.org><br><b>Subject:</b> [Qgis-user] QGIS Assistance Needed – Ski Slope Path Calculation</span><div style="font-family: Calibri, sans-serif;"> </div></div><meta name="Generator" content="Microsoft Word 15 (filtered medium)">



<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;">Hello,</p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;"> </p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;">I am looking for a solution in QGIS to calculate a new ski slope connection between two given points on a provided terrain model. The ski slope must never go uphill. The path does not need to be the shortest possible,
 but it is essential that the start and end points are connected.</p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;">I am aware that water flow analysis generally follows the fastest downhill route, but in this case, I need the path to be directed toward the specified end point rather than simply the steepest descent.</p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;">I would greatly appreciate any guidance or suggestions on how to achieve this in QGIS.</p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;">Thank you very much for your help.</p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;"> </p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;">Best regards,</p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;">Jakob Rabanser</p><p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 11pt;"> </p></div></body></html>