qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.59k stars 3.01k forks source link

Cannot create height profile at re-visited sections #50476

Open SGroe opened 2 years ago

SGroe commented 2 years ago

What is the bug or the crash?

I have a path for a sport event featuring some sections that are used twice.

Now I want to create a height profile for the entire track. Here I noticed that the tool only creates the height profile where the profile line visits coordinates for the first time. Each re-visited section results in a straight line in the profile.

Expected: the height profile should be correct for each section of the path, also for sections that are visited multiple times.

Steps to reproduce the issue

  1. Add DEM to QGIS project
  2. Set this DEM as elevation layer in project settings
  3. Add line to the project. Some parts should exactly overlap (use the same coordinates)
  4. Open height profile and use the line as profile line
  5. Check the line sections that are visited twice

Versions

QGIS-Version 3.26.3-Buenos Aires QGIS-Codeversion 65e4edfdada Qt-Version 5.15.3 Python-Version 3.9.5 GDAL-Version 3.5.1 PROJ-Version 9.1.0 EPSG-Registraturdatenbankversion v10.074 (2022-08-01) GEOS-Version 3.10.3-CAPI-1.16.1 SQLite-Version 3.38.1 PDAL-Version 2.4.3 PostgreSQL-Client-Version unknown SpatiaLite-Version 5.0.1 QWT-Version 6.1.6 QScintilla2-Version 2.13.1 BS-Version Windows 10 Version 2009

Aktive Python-Erweiterungen qfieldsync v4.2.0 QuickOSM 2.1.1 slyr_community 4.0.6 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99 sagaprovider 2.12.99

Supported QGIS version

New profile

Additional context

No response

SGroe commented 2 years ago

Here is a screenshot: Sections A and B refer to the same part of the track, however, only the first one has the correct height profile.

Screenshot 2022-10-07 105021

nicogodet commented 2 years ago

On revisited path, does your polyline re-use existing vertices or are they duplicated ?

Best would be to share a sample project if possible.

SGroe commented 2 years ago

Existing vertices are reused (with the QGIS line edit tools). I guess there are two vertices with the same coordinates internally.

Sample data:

nicogodet commented 2 years ago

Confirmed image

As a workaround, add intermediate vertices on one of the duplicated section image