Converting E00 Files
Although some GIS applications support using E00 files directly you will likely find it more efficient to convert them to another format. This can be easily done with ogr2ogr.
Converting to a Shapefile
ogr2ogr -f "ESRI Shapefile" -a_srs EPSG:4326 dnnet dnnet.e00
This will convert the dnnet.e00 file located in the current directory into a set of files in the subdirectory dnnet. The subdirectory will be created by ogr2ogr and will contain shape files matching the feature types included in the E00 file. The -a_srs switch assigns the WGS 84 geographic spatial reference to the new shapefiles (it does not transform the coordinates).
Converting to PostgreSQL/PostGIS
Assuming you have an existing database, you should create a new schema to hold the layers[1]:
gsherman@ubuntu:~/geospatial_desktop_data$ psql geospatial_desktop
psql (8.4.9)
Type "help" for help.
geospatial_desktop=# create schema dnnet;
CREATE SCHEMA
Then convert the E00:
ogr2ogr -f PostgreSQL -a_srs EPSG:4326 "PG:dbname=geospatial_desktop active_schema=dnnet" \ dnnet.e00
This will give you a set of layers in the dnnet schema, one for each included feature type in the E00.
Converting to Spatialite
You can convert the E00 to Spatialite, creating a new database all in one command:
ogr2ogr -f SQLite -a_srs EPSG:4326 -dsco SPATIALITE=yes e00_test.db dnnet.e00
If you want to append to an existing database, use the -append switch without specifying the -dsco SPATIALITE=yes switch.
ogr2ogr -f SQLite -a_srs EPSG:4326 -append my_existing.db dnnet.e00
That’s it. As you can see it’s easy to convert an E00 to your favorite format using ogr2ogr.
For information on the layer types that can exist in an E00 file, see http://www.gdal.org/ogr/drv_avce00.html
1 There appears to be no way to rename the layers on import so creating a new schema in PostgreSQL or a new Spatialite database is the safest way to prevent clashes with existing layers.
November 24, 2011
· admin · 2 Comments
Tags: ogr2ogr, posgresql, postgis, spatilite · Posted in: OGR
2 Responses
Digger - December 19, 2011
Unparalleled accuracy, unuqeivocal clarity, and undeniable importance!
Lainey - February 29, 2012
You have the mnoolopy on useful information-aren’t monopolies illegal? 😉
Leave a Reply