2

I'm trying to import a csv file. Most similar cases are trivial but the csv file contains only the data (sunshine hours) and a header specifying the coordinate of the first cell, the number of columns and rows and the cell size. Is there any way to automate the import in QGIS or do I have to reformat the file and calculate each position?

Snippet:

NCOLS  280
NROWS  220
XLLCORNER 4452000
YLLCORNER 5324000
CELLSIZE 100
NODATA_VALUE  -99.9


  29.5  29.5  29.5  29.5  29.5  29.5  29.5  29.5  29.5  29.5  29.5  29.5  29.5  29.6  29.6  29.8  29.8  29.8  29.8  29.9  29.9  29.9  30.0  30.0  30.0  30.1  30.2  31.1  33.8  33.8  32.1  32.2  34.5  35.2  34.0  27.2  26.1  24.7  25.4  29.4  29.0  29.3  26.2  27.2  30.0  30.1  30.2  30.4  30.4  30.4  30.5  31.0  31.1  32.1  33.9  35.2  36.0  36.2  35.5  35.8  36.3  36.6  36.6  36.6  36.8  36.7  36.5  36.3  35.1  34.5  32.5  31.7  31.5  31.5  31.4  31.3  31.2  31.2  31.1  31.1  31.1  31.0  31.0  30.9  31.0  30.9  30.9  30.9  30.9  30.9  30.8  30.7  30.7  30.6  30.6  30.6  30.6  30.2  30.2  30.2  30.2  30.2  30.3  30.2  30.3  30.3  30.3  30.3  29.9  30.0  30.8  30.7  30.7  30.7  30.7  30.7  30.7  30.6  30.6  30.6  30.5  30.0  30.0  29.9  26.7  28.7  28.5  26.7  26.7  27.2  30.1  30.3  30.4  30.4  30.4  30.8  31.0  31.0  31.0  31.2  31.2  31.7  31.8  31.9  32.6  35.0  35.9  34.8  32.0  31.5  30.7  30.4  30.2  30.1  29.6  28.9  28.6  28.6  28.5  28.5  28.6  28.5  28.5  28.5  28.5  28.5  28.5  28.5  28.5  28.6  28.1  23.5  21.8  21.0  20.6  20.4  20.4  20.4  20.4  20.6  21.1  21.7  23.3  26.2  30.5  38.8  39.5  40.5  40.6  40.0  39.9  40.2  40.8  40.2  40.4  40.9  41.0  41.0  41.0  40.4  40.2  40.1  39.9  39.7  39.4  37.8  33.7  32.4  33.0  34.7  35.3  35.5  34.8  34.4  32.8  32.5  32.4  33.0  36.0  36.6  36.7  36.8  36.9  37.0  37.1  36.6  35.1  32.9  32.4  31.8  31.1  30.5  30.3  30.2  30.2  29.9  29.8  29.7  29.3  29.3  25.1  21.1  20.1  20.1  20.9  21.0  20.4  21.0  20.5  20.5  23.3  30.3  30.7  32.1  34.5  35.3  35.6  34.9  33.9  31.9  30.9  30.8  30.7  30.7  30.7  30.7  30.7  30.7  30.7  30.6  30.5  29.6  29.5  29.5  29.4  29.4  29.4  29.5  29.4  29.4

3
  • 2
    Might be useful to post an example of the csv. Jan 7 at 23:28
  • 3
    sounds more like as ASCII raster
    – Llaves
    Jan 7 at 23:33
  • 1
    some python would be helpful, please post an example
    – eurojam
    Jan 8 at 6:53
2

As @Llaves suggests that is an ASCII Grid file not a CSV file, so you need to use the raster import tool not the vector one.

enter image description here

1
  • 1
    Or drag and drop to the QGIS window, than you don't have to bother which data type it is (does not work of course if you want to create geometries of a CSV, but for an ASCII grid, it should work).
    – Babel
    Jan 8 at 10:09

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.