Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
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
add comment

2 Answers 2

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

share|improve this answer
    
Thanks for your reply. Actually the files are with xyz format. –  Matt 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
add comment
up vote 0 down vote accepted

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

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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