I have some 100 CSV files. I want to convert them in shp format using Java. The csv file contains lat long information in WGS84. I can understand it is a batch processing and it is difficult to do in ArcGIS. is there any spatial plugin for eclipse that will do the task? I had a look at Geotools but found it bit complicated. Anything straight forward?
-
I am using ArcGIS for Desktop. The problem is when I am trying to do the batch processing through Make XY event it is not showing me the CSV files.– user26161Commented Aug 8, 2014 at 4:59
-
You'll need to create a table from your CSV file first through Table To Table– PolyGeo ♦Commented Aug 8, 2014 at 5:41
2 Answers
You mention Java in your question title but in your question body and tags it seems that ArcGIS for Desktop is available/preferred.
The ArcGIS for Desktop procedure that I would use to do this is to perform the following three steps on one CSV file to make sure the workflow works, and then use Copy As Python Snippet to copy the syntax for the three tools into a Python script that you add iteration through your 100 files to:
-
Thank you PolyGeo. That was helpful. I am not that verse with python. I was wondering how can I export all the layers to shape file in the Table of Content in one go? Commented Aug 8, 2014 at 10:18
-
@user26161 That sounds like a new question which is best researched/asked separately. I suspect it has already been answered elsewhere on this site but if not it I think it would make a useful Q&A in its own right.– PolyGeo ♦Commented Aug 8, 2014 at 21:45
If you want to use Java, you have a few libraries available including GeoTools and the Java bindings for GDAL/OGR API. Using these you can code a solution (check out the documentation). However, far simpler would be to install GDAL which comes with pre-compiled utilities and use ogr2ogr. You can wrap that in a batch process as required.