2

I can easily read e00 files with QGIS and it seems as if in older versions of ogr there was driver support for the arc/info e00 file format. Nowadays that seems to be deprecated, as running ogrinfo --formats doesn't list arc/info.

I also found this useful link, a general description of the file format. Based on that information I would be able to write my own program to put all the pieces together. But hey, this must have been done before, right?

Can somebody point me into the right direction?

  • It shouldn't be deprecated in OGR, accoding to this page it should be one of the default drivers. What distribution/version of GDAL are you using? – Evil Genius Jan 6 '14 at 13:54
  • I've seen this page. But it does not refer to the python ogr bindings as far as I can see. – LarsVegas Jan 6 '14 at 18:44
  • You should have the same drivers available to the python bindings as listed from ogrinfo (python bindings are just a wrapper around the c/c++ library that ogrinfo uses itself). The only exception to that would be plugin drivers, which require environment variables to be set. – Evil Genius Jan 6 '14 at 21:17
4

For completeness sake.

acr_file = r'../xxx.e00' 
dr = ogr.GetDriverByName("AVCE00")
f = dr.Open(arc_file)

In my case, if I do a layer count I will get 2 because the e00-file contains polylines and -points.

f.GetLayerCount()
>>> 2

Lines are always named 'ARC', whereas points are named 'LAB'. So

lyr_arc = f.GetLayerByName('ARC')
lyr_arc.GetFeatureCount()
>>> 476562

will give you access to the polylines part and

lyr_lab = f.GetLayerByName('LAB')
lyr_lab.GetFeatureCount()
>>> 62882

to the points part of the file.

  • Nice. Mark as answered? – Chad Cooper Jan 9 '14 at 13:22
1

If you have ArcGIS installed then you can run the conversion program in the bin directory. On my machine it is:

C:\Program Files (x86)\ArcGIS\Desktop10.2\bin\import71.exe

I've not tried it, but may be you can call it from the command prompt with parameters?

  • No arcgis. Also i need a python approach, as stated in my question. – LarsVegas Jan 6 '14 at 18:45
  • I was thinking you would spawning a shell process in Python but as you do not have ArcGIS this won't work. – Hornbydd Jan 6 '14 at 21:45

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.