1

I need to import data on WAsP software but I am finding problems to convert the data I got from an official website to a file readable by WAsP.

in summary I have a file like this:

 -39.0250     -6.97502      314.000
 -39.0242     -6.97502      310.000
 -39.0233     -6.97502      316.000
 -39.0225     -6.97502      312.000
 -39.0217     -6.97502      306.000
 -39.0208     -6.97502      309.000
 -39.0200     -6.97502      318.000
 -39.0191     -6.97502      316.000

and so on.....very looong file.

Do you have any idea how to turn a .txt like this to a .xyz

I am beginner on such topic, so please, be as clear and specific as possible.

closed as unclear what you're asking by ahmadhanb, BERA, Kersten, ArMoraer, mgri Oct 10 '17 at 7:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What exactly do you mean by XYZ file? That looks like either space or tab delimited XYZ, do you need comma delimited? (.CSV) Do you need a header row? What software do you have available? – Michael Stimson Oct 10 '17 at 2:18
  • 2
    Have you tried using the file as is, by changing the file suffix, because that looks like it has X, Y, and Z values to me. Note that GIS SE is not a tutorial site, and that questions here should demonstrate some basic research and an independent attempt to solve the problem. See the Tour for more on how this site operates. – Vince Oct 10 '17 at 2:19
  • Yeah, i have tried changing the file's name and rearranging the data. i am sorry if it seemed that i am looking for a tutorial, i have struggled against the software before asking for help, but okay i wll try to be clearer: I am working wiith software WAsP; I need to import the orographical data on the software, and this raw data is given to me as shown before; I went to the software specialist that told me i should convert my file to .xyz file using QGIS; I tried using QGIS, i went to Raster>convert and got message: ERROR 1: Ungridded dataset: At line 3721, too many stepY values – Passos Oct 11 '17 at 22:49
  • We still do not know the size of your file in MB or GB? try to divide that file into several smaller ones and drag them separately, then merge the layers. – nagib Oct 12 '17 at 5:30
0

Format your data with ms excel and save lake *.txt file. Next, open that file with notepad and save it yourfile.xyz

  • This method can be dangerous, older versions of Excel have a limit of 65535 rows and Excel does not warn you when you exceed this limit, it just dumps the rest of the values; I issue this warning in painful memory of when this limitation bit me when I was least suspecting. The OP clearly states that it is a long file but does not mention if there's more than the Excel limit. If the file is very long opening in Notepad can gobble up memory, take a very long time to open and possibly even blue screen your computer (again from painful memory). – Michael Stimson Oct 10 '17 at 21:29
  • who still uses the old excel version? New versions of excel 2010 and up, can have 1048576 rows I would like to hear the author, how big are the data? I hope he does not need data for the whole world, otherwise there is no solution. – nagib Oct 11 '17 at 5:20
  • When it comes to XYZ files 1024² isn't an unusually big file, that's only slightly more than 1 sample per square metre over a 1km tile, I regularly create and consume XYZ and XYZI files many times that size. – Michael Stimson Oct 11 '17 at 20:51
  • Ok. You offer another solution. – nagib Oct 12 '17 at 5:24
  • This question is closed so I can't add a new answer, also the OP is still not clear on what is needed. Previously I've used python (<10 lines of code) to add/remove a header row, replace delimiters and remove excess items. Some superior text editors allow find and replace in files without having to open them first (like Notepad++ cybernetnews.com/find-replace-multiple-files) neither of these have the same limitation as Excel or even Access (old version 2147483647 rows and 2GiB of table, new version 2GiB of table). Though I find it easier to convert to LAS records then export when done. – Michael Stimson Oct 12 '17 at 20:53

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