I have a plethora of xyz format files and I want to convert them into shapefiles separately and it is really time-consuming to do this conversion one by one.

I tried to create a model in ModelBuilder to read them from an input folder and does the conversion into shapefiles and then put them into the output folder with the same input name or use a wildcard to choose some of them to convert.

enter image description here

However, the files that I'm trying to convert are XYZ foramt (e.g. file.xyz) ASCII files. Anyway, I used the following model to convert the files in the folder and what it really does is just converting the first file and then stops. I also ticked on the Recursive but it only converts the first file and stops.

Can anyone help with that?

  • 1
    Have you looked at incorporating the Iterate Files option, help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/…?
    – artwork21
    Jun 22 '12 at 12:10
  • You note below you've got a model that works on a single file? As an alternative to just model builder you could export your model to a Python script and use a simple for... loop to iterate over your files (the glob library might help with making the file list). You can even put the script back into a toolbox if you wish.
    – om_henners
    Jun 25 '12 at 2:58

I tested the following model and it works pretty well. The only inputs are the input folder where your .txt files are stored and the output folder. The output .shp name is the same as your input .txt name. Good luck!

enter image description here

  • Thanks for your reply. Actually the files are with xyz format.
    – Mehdi
    Jun 25 '12 at 2:09
  • if you open your xyz ascii data, is the format similar to the following, with "x,y,z," as a header?: x,y,z, 838959.41800,4713239.59000,1.00000 841305.41800,4708452.59000,1.00000 839175.41800,...
    – Aaron
    Jun 25 '12 at 12:40

Thanks. However, I finally managed to create a model for it.

enter image description here

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.