3

Given the following .vrt file which I manually created:

<OGRVRTDataSource>
    <OGRVRTLayer name="DGM5_BE">
        <SrcDataSource>DGM5_BE.txt</SrcDataSource>
        <SrcLayer>DGM5_BE</SrcLayer>
        <LayerSRS>EPSG:25833</LayerSRS>
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding="PointFromColumns" x="x" y="y" z="d"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

and the associated DGM5_BE.txt - here are the first lines:

x;y;d
397200;5837250;59,15
397205;5837250;59,04
397200;5837245;59,03
397205;5837245;58,94
397195;5837240;58,93
397200;5837240;58,9
397205;5837240;58,86
397210;5837240;58,9
397190;5837235;58,98

I run the following command to convert the DGM5:

$ gdal_grid -of GTiff -ot Float32 -l DGM5_BE DGM5_BE.vrt DGM5_BE.tif

This fails with the following error message:

ERROR 1: Failed to open datasource `DGM5_BE.txt'.
No point geometry found on layer DGM5_BE, skipping.

3

From the CSV driver documentation:

Starting with GDAL 1.8.0, for files structured as CSV, but not ending with .CSV extension, the 'CSV:' prefix can be added before the filename to force loading by the CSV driver.

Either rename DGM5_BE.txt to DGM5_BE.csv or change the <SrcDataSource> element to:

<SrcDataSource>CSV:DGM5_BE.txt</SrcDataSource>
  • Thx. I can't believe how long it takes to calculate a TIFF! I already added --config GDAL_NUM_THREADS ALL_CPUS. Is there recommendable format other than TIFF which can be used in QGIS? – JJD Jul 4 '14 at 13:47
  • The problem is that triangulation is only a single thread process, irrespective of how many CPU threads you allow this process it can only use 1 to triangulate with the other threads for reading/writing. There are options that do slow down a TIFF, what compression are you using? I don't think you will get any more performance from this process regardless of the output format. – Michael Stimson Aug 9 '18 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.