<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
I'm sending this to the gdal-dev on the assumption that gdal
underlies QGIS's creation and export of shapefiles. Let me know if
this is a bad assumption and I'll redirect to qgis-dev<br>
<br>
Background - <br>
I created a vector layer in QGIS with layer type shapefile and
geometry type linestring. I then used the drape processing algorithm
to add elevation values from a DEM in the QGIS project. I then
exported the draped layer as a shapefile. I then passed this
shapefile to an online utility that converts the shapefile into a
Litchi (drone app) compatible CSV file. The converter issues a
number of warnings. I also used the Extract Vertices utility to
create point geometry which I also exported as a shapefile. This,
too, created warnings.<br>
<br>
The author of the utility told me he is using a PHP library located
<a moz-do-not-send="true"
href="https://gasparesganga.com/labs/php-shapefile/">here</a> to
handle the shapefile. The library author has this to say about the
errors:<br>
<blockquote>
<div>It is indeed what I was suspecting: QGIS is creating a
malformed 3D (4D actually) file when there is no Z nor M
dimension needed.<br>
Basically they're missing binary data for Z and/or M dimensions
either for the very last record (pretty usual) or sometimes ALL
OF THEM (more rare, but I've seen some of them)!</div>
</blockquote>
<div>He was not specific beyond that. <br>
<br>
If I load these shapefiles into QGIS and look at the geometry, the
z-values are what I would expect.<br>
<br>
<br>
The LineStringM and Point shapefiles are <a
moz-do-not-send="true"
href="https://mega.nz/file/fZBHGZpK#Fw2qTl_D7K6dHeKZElgE5HyiBVGhRMLFMINe6M_O5k8">here.</a><br>
<br>
</div>
<blockquote>
<div><br>
</div>
<div><br>
</div>
<br>
</blockquote>
</body>
</html>