Importing all ascii files from a folder

Hello,
I was able to import individual files with "IMPORT_ASCII" with the prj file  speicifiy, however when I tried to import all xyz files in that folder with "IMPORT_DIR", it wouldn't do it. How can I import all ascii files from a specified folder?
Thanks

Answers

  • kaankaan Posts: 12
    IMPORT_DIR_TREE DIRECTORY="C:\XYZ_Ascii_1m\" TYPE=ELEVATION COORD_DELIM=AUTO PROJ_FILENAME="C:\XYZ_Ascii_1m\lidar.prj"

    This line above doesn't work for the multiple files in the directory. I receive the "select overlay type" window pop-up, and even after I select "ASCII text" from the list  it returns "no overlays could be loaded from file" for each of the xyz files in the folder.

    IMPORT_ASCII FILENAME="C:\XYZ_Ascii_1m\lidar.xyz" TYPE=ELEVATION COORD_DELIM=AUTO PROJ_FILENAME="C:\XYZ_Ascii_1m\lidar.prj"

    However, this line with individual ASCII file works as expected.

    Nats
  • BillBBillB Global Mapper User Posts: 119Trusted User
    Hi, take a look at the helpfile here:

    Note:
    •  "You can include wildcards ('*' or '?') in the FILENAME (v16.0.5. or later) to load all files matching a particular mask" - so *.XYZ might do what you need.
    •  "PROJ_FILENAME (DEPRECATED use PROJ instead)- specifies the name of the projection (.prj) file"




  • kaankaan Posts: 12
    Thanks for the response!
    I tried  using a wild card and received the error;
    "ERROR: File C:\Users\KaanE\LIDAR\14623_60_20_W5M_CNRL\14633_51_52_17_W5M_CNRL\NAD_27\XYZ_Ascii_1m\XYZ_Ascii_1m\BareEarth\*.xyz does not exist."

    IMPORT_ASCII FILENAME="C:\XYZ_Ascii_1m\*.xyz" TYPE=ELEVATION COORD_DELIM=AUTO PROJ_FILENAME="C:\XYZ_Ascii_1m\lidar.prj"

  • kaankaan Posts: 12
    I used dir_loop instead of trying to do this with one line, and it worked.
    Cheers.
Sign In or Register to comment.