3

First let me say that I am novice in GIS department. As archaeologist I had only some courses 8 years back when i was still studying.

Now, the problem:

When I try to import .asc as raster layer I get this message:

ngridded dataset: At line 3, X spacing was 0.000000. Expected >0 value

I know this is a problem because "Cells with same Y coordinates must be placed on consecutive lines"

But my format viewed in Notepad++ is like this:

426000.78;55000.15;562.24 
426000.78;55001.15;562.22 
426000.78;55002.15;562.20
426000.78;55003.15;562.30
426000.78;55004.15;562.21
426000.78;55005.15;562.21
426000.78;55006.15;562.27

And my question - How do I change it to readable format. Any quick solutions?

2

The quickest solution would be to load the data into LibreOffice Calc, and sort the data on the second column, then the first one ascending. The result should look like:

426000.78;55000.15;562.24 
426001.78;55000.15;562.22 
426002.78;55000.15;562.20
426003.78;55000.15;562.30
426004.78;55000.15;562.21
426005.78;55000.15;562.21
426006.78;55000.15;562.27
....
426000.78;55001.15;562.96
426001.78;55001.15;562.22 

Saving to csv should give you the right format for GDAL.

See http://www.gdal.org/frmt_xyz.html for more details.


UPDATE

Looking at the whole dataset, your grid has no constant cell size, maybe due to reprojection from another CRS.

So your only chance to use the data is to round the data to full meter cell size, or import it as delimited text point layer, then run Raster -> Interpolation -> Interpolation on it.

  • Thanks. What should I do with GDAL? DO i need to download program, which will transform csv to .asc format? How do i do this? Am noob in this field :D – Jost Hobic Apr 18 '15 at 9:45
  • GDAL works in the background of QGIS. So if your data has a format that GDAL can read, QGIS is able to dispay it. – AndreJ Apr 18 '15 at 14:17
  • Im really sorry but i just cant get my head around this. I have sorted data in second column (i used extended selection) and then sorted first one ascending (also used extend selection). When i open csv save in QGIS i get this Ungridded dataset: At line 2, X spacing was 0.000000. Expected >0 value – Jost Hobic Apr 22 '15 at 13:25
  • I am not sure if notepad++ can sort on two columns in one step (which I had in mind using LibreOfficeCalc). With the two sortings your result would look the same as in your question? – AndreJ Apr 22 '15 at 18:09
  • I did sort out both columns as you said in LibreOFfice Calc...and i get error as i posed it yesterday... im i doing something wrong? – Jost Hobic Apr 23 '15 at 7:52
-1

Have you tried installing the LASTools Qgis plugin:

For usage and installation, you can follow a tutorial : Follow this link

Or the Qgis docs and this link

And then import ur dataset using this tools Hope that helps

  • I have tired this and it works on zLAS format of data. Thnks! But i would also like to know how to work with DMR in .asc format. – Jost Hobic Apr 22 '15 at 15:22

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.