Hi list, using GDAL > Raster projections > Assign projection did the trick. Now I get beautiful contour lines as expected (directly in QGIS).
Thanks you Alister for pointing this out! Regards, Rolnad Date: Wed, 4 Oct 2023 16:44:38 +0200 From: Roland Spielhofer <rsp...@gmx.net> To: QGIS User <qgis-user@lists.osgeo.org> Subject: [Qgis-user] Create contours algorithm does not work Message-ID: <trinity-9299223f-260f-4956-9a59-0adffff051d1-1696430678309@3c-app-gmx-bs35> Content-Type: text/plain; charset="us-ascii" An HTML attachment was scrubbed... URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231004/22022935/attachment-0001.htm> Hi Roland, I note that your gdalinfo output does not include the usual "Coordinate System is:" section after the "Size" line. You will probably find it works as expected if you rectify this, by specifying a projection using the "assign projection" or "translate (convert format)" QGIS processing tools. I tend to have the same problem when working with "Arc/Info ASCII Grid" files produced by 12D - in this case gdalinfo prints a "Coordinate System is:" section but it just looks like this, instead of actually having the coordinate system details: Coordinate System is `' I simply use "translate (convert format)" to convert to a geotiff and specify the correct coordinate system, and I have no problem generating contours from that geotiff. PS I was only able to read your email after clicking the link for the "scrubbed" html attachment, and ignoring all the html code - see above. If you want everybody on the list to actually read your emails you should configure your email client to also send plain text email instead of just sending html email. Regards, Alister Gesendet: Donnerstag, 05. Oktober 2023 um 12:23 Uhr Von: "Roland Spielhofer" <rsp...@gmx.net> An: "QGIS User" <qgis-user@lists.osgeo.org> Betreff: Aw: [Qgis-user] Create contours algorithm does not work Just wanted to add that I also tried the latest gdal_contour CLI command - with the same result. gdalinfo of the raster-tif says: Driver: GTiff/GeoTIFF Files: Axx_PPS_1_0000_Z.tif Size is 1291, 3701 Origin = (590694.146499999915250,5311061.004799999296665) Pixel Size = (0.050000000000000,-0.050000000000000) Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 590694.146, 5311061.005) Lower Left ( 590694.146, 5310875.955) Upper Right ( 590758.696, 5311061.005) Lower Right ( 590758.696, 5310875.955) Center ( 590726.421, 5310968.480) Band 1 Block=1291x1 Type=Float32, ColorInterp=Gray Min=312.351 Max=314.506 Minimum=312.351, Maximum=314.506, Mean=313.375, StdDev=0.602 NoData Value=-99999 Metadata: STATISTICS_MAXIMUM=314.50564575195 STATISTICS_MEAN=313.37469987748 STATISTICS_MINIMUM=312.35101318359 STATISTICS_STDDEV=0.60238892993285 Anything wrong with it? It has been generated by SAGA by rastering a pointcloud. Regards, Roland Gesendet: Mittwoch, 04. Oktober 2023 um 16:44 Uhr Von: "Roland Spielhofer via QGIS-User" <qgis-user@lists.osgeo.org> An: "QGIS User" <qgis-user@lists.osgeo.org> Betreff: [Qgis-user] Create contours algorithm does not work Hi, I have a 1-band raster representing the surface of a road - the pixels hold the z-values/elevation. I have loaded it into QGIS and used "contours" as renedering method. The result looks good, I additionally have the same raster with hillshading as rendering - very pleasent - see https://imgur.com/XMmMmdj the fuzzy black lines are the contours, the light area is the hillshaded z-raster. One drawback of the on-the-fly contours is that they are limited to a minimum interval of 0.1 m. As the surface is very flat (a road), I would like to have a more dense set of contours (0.02 m, e.g.). I tried the contours function (GDAL > Raster extraction > contours) from the processing toolbox. It created a new layer with a plausible number of lines, but the lines are not visible, no matter what I try. The log of Contour is below - I do not see anything special. I tried to calculate the length of the geometries, but I get "nan" for each. Any ideas why the contours function does not produce meaningful output while the rendering as contours works beautifully? Kind regards, Roland QGIS version: 3.32.1-Lima QGIS code revision: 4a078ecf63 Qt version: 5.15.3 Python version: 3.9.5 GDAL version: 3.7.1 GEOS version: 3.12.0-CAPI-1.18.0 PROJ version: Rel. 9.2.1, June 1st, 2023 PDAL version: 2.5.5 (git-version: a7569c) Algorithm started at: 2023-10-04T16:39:30 Algorithm 'Contour' starting… Input parameters: { 'BAND' : 1, 'CREATE_3D' : False, 'EXTRA' : '', 'FIELD_NAME' : 'ELEV', 'IGNORE_NODATA' : False, 'INPUT' : 'Q:/RoadSTAR/Archiv/_Diverses ohne Proj.Nr/A02_Detailauswertung/A02_2-1_km28,080_km27,694___230713_1758/A02_2-1_KM28,147_KM27,957_230713_1758/GeoTIFF/A02_2-1_KM28,147_KM27,957_230713_1758_PPS_1_0000_Z.tif', 'INTERVAL' : 0.1, 'NODATA' : None, 'OFFSET' : 0, 'OUTPUT' : 'TEMPORARY_OUTPUT' } GDAL command: gdal_contour -b 1 -a ELEV -i 0.1 -f "GPKG" "Q:\\RoadSTAR\\Archiv\\_Diverses ohne Proj.Nr\\A02_Detailauswertung\\A02_2-1_km28,080_km27,694___230713_1758\\A02_2-1_KM28,147_KM27,957_230713_1758\\GeoTIFF\\A02_2-1_KM28,147_KM27,957_230713_1758_PPS_1_0000_Z.tif" C:/Users/lokaladmin/AppData/Local/Temp/processing_lqTuzZ/d902fb853ce246a59f2768d2f0607ba6/OUTPUT.gpkg GDAL command output: 0...10...20...30...40...50...60...70...80...90...100 - done. Process completed successfully Execution completed in 0.39 seconds Results: {'OUTPUT': 'C:/Users/lokaladmin/AppData/Local/Temp/processing_lqTuzZ/d902fb853ce246a59f2768d2f0607ba6/OUTPUT.gpkg'} Loading resulting layers Algorithm 'Contour' finished https://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdj[https://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdjhttps://imgur.com/XMmMmdj]_______________________________________________ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user[https://lists.osgeo.org/mailman/listinfo/qgis-user] Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user[https://lists.osgeo.org/mailman/listinfo/qgis-user] _______________________________________________ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user