POST
|
Sorry for the delay in replying to you. I'm using Python 2.7.5 with ArcGIS 10.4.1 for Desktop Advanced, Product Version: 10.4.1.5686. I've tried to use ListDatasets instead of ListFiles without success. Since this is older code, I'm starting to think that it might be better to restart from scratch. Thanks again for your help, I truly appreciate it.
... View more
03-12-2018
02:15 AM
|
0
|
0
|
843
|
POST
|
Thank you, Rebecca. I'm not at the office right now, but as soon as I get there, I'll let you know what version of the software I'm exactly using. Until then, I'll dig into the documentation to learn more.
... View more
03-08-2018
07:56 AM
|
0
|
0
|
843
|
POST
|
Thank you, Xander. I really appreciate your help. What does the print statement on line 12 yield (how many E00 files do you have and what are their names)? Can you include the result of the print statement in this thread? Make sure that the E00 files do not have spaces, since those are not supported in the output coverage name. I have a bunch of E00 files located at the workspace folder. All files are named according to the following pattern: P0XXXX.E00 (P02000.E00, P02800.E00 and so on). No spaces either. The print statement on line 12 yields "Converted P02800.E00", so now that you mention it I've realized that it isn't batch converting every E00 files. Perhaps the second part does not find any results for using the ListFiles. You can use ListDatasets—Help | ArcGIS Desktop . instead on line 16: I'll give it a try and I'll let you know. As a side note, E00 and coverages are a very dated data format. In many cases data providers have switched to more recent formats (like proprietary File Geodatabases). Check and see if perhaps a newer file format is available to avoid any conversions. Thanks for the information. Sadly, I've been asked to work with tons of E00 files, so at least in the short term I have to deal with this data format.
... View more
03-08-2018
04:48 AM
|
0
|
0
|
843
|
POST
|
Hi there. I'm not only new to Python, but also to ArcGis and I'm quite stuck trying to create a script to batch convert .e00 files to .shp files. I've started working with a script that I found in this very own site, but I'm not able to make it work properly. It seems that the first part of the code, where the conversion to coverage files is made, runs fine, but the second part, where the conversion to .shp files should be made, doesn't work. It just does anything. I don't get any traceback erros. Could you please give me a hint? import arcpy, os
arcpy.env.overwriteOutput = True
arcpy.env.workspace = ws = r'C:\in'
out = r'C:\out'
if not os.path.exists(out):
os.makedirs(out)
for cov in arcpy.ListFiles('.e00'):
arcpy.ImportFromE00_conversion(cov, ws, cov.split('.')[0])
print 'Converted %s' %cov
for cov in arcpy.ListFiles():
if not '.e00' in cov and cov != 'info':
arcpy.env.workspace = os.path.join(ws,cov)
for fc in arcpy.ListFeatureClasses('*polygon'):
shp = os.path.join(out, '%s.shp' %cov)
arcpy.FeatureClassToFeatureClass_conversion(fc, out)
print 'Converted Coverage to %s' %shp Thank you so much in advance.
... View more
03-08-2018
01:26 AM
|
0
|
6
|
1419
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|