SyntaxHighlighter

Thursday, January 31, 2008

Escape from PGeo

Scenario

There's spatial data you want in an "ESRI Personal Geodatabase" file, but you don't have any ESRI tools. How do you get it out?

One short answer
One how-to (steps verified on Windows Vista)

Explore the content with ogrinfo
C:\Users\Tom\Documents\itins>ogrinfo ItAntMapping.mdb
INFO: Open of `ItAntMapping.mdb'
using driver `PGeo' successful.
1: whollyimprecise
2: placesAdded
3: placesEstimated
4: placesSolid
5: stretchesDangling
6: stretchesFloating
7: stretchesSolid
8: tpPoints
9: stretchesUnlocated
Extract a layer to an ESRI shapefile
C:\Users\Tom\Documents\itins>ogr2ogr -f "ESRI Shapefile" itant-solidplaces.shp I
tAntMapping.mdb placesSolid
Verify results
C:\Users\Tom\Documents\itins>dir itant-solidplaces.*
Volume in drive C has no label.
Volume Serial Number is 2C47-654D

Directory of C:\Users\Tom\Documents\itins

01/31/2008 04:00 PM 1,141,669 itant-solidplaces.dbf
01/31/2008 04:00 PM 147 itant-solidplaces.prj
01/31/2008 04:00 PM 85,780 itant-solidplaces.shp
01/31/2008 04:00 PM 24,580 itant-solidplaces.shx
4 File(s) 1,252,176 bytes
0 Dir(s) 172,586,586,112 bytes free
Coming soon

A sequel, wherein we write a python script to automate the extraction of multiple feature classes (layers, themes) with different geometries from a single geodatabase file to multiple shapefiles.

Thanks

Sean and Howard.

2 comments:

Anonymous said...

I've been looking all over for a way to convert .mdb files to shapefiles so I can use them in Google Earth Pro - thank you so much for laying out the process so clearly!

John B Dougherty said...

Working with what I thought was a ESRI Personal GeoDatabase
http://www.fs.fed.us/ipnf/eco/yourforest/gis/roads/roaddata.zip
but has no layer info:

INFO: Open of `ODBC:atlas'

using driver `ODBC' successful.



Layer name: II_ROAD_LINEAR_EVENTS_062106

Geometry: Unknown (any)

Feature Count: 8532

Layer SRS WKT:

(unknown)
...

org2org does not output a prj file.

How is this attribute data indexed to the spatial data?

http://www.fs.fed.us/ipnf/eco/yourforest/gis/roads/cdaroads.zip
containing
cdaroads.e00 9912K

cheers!