[postgis-users] USGS NHD data to PostGIS
Randy George
rkgeorge at cadmaps.com
Mon Feb 5 13:11:07 PST 2007
Hi,
As an experiment I'm attempting to import USGS NHD data
ftp://nhdftp.usgs.gov/SubRegions/ into PostGIS. The NHD data comes as ESRI
geodatabase .mdb files. I was glad to see that ogr2ogr now supports ESRI
geodatabase mdb format, so I tried using ogr2ogr 1.4.0 in FWTools 1.1.3, but
ran into some problems.
Using:
Windows 2003
PostgreSQL 8.1
postgis-1.1.3
FWTools 1.1.3
ogr2ogr 1.4.0
First, I used this shell command:
ogr2ogr -f PostgreSQL PG:"user=user dbname=NHD host=localhost
password=password port=5432" D:\NHD\NHDH0101\NHDH0101.mdb
The translation went smoothly without apparent error resulting in a set of
tables with geometry_columns entries:
"8012398";"''";"public";"Basin";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012493";"''";"public";"HYDRO_NET_Junctions";"wkb_geometry";"2";"32767";"GE
OMETRY"
"8009168";"''";"public";"NHDArea";"wkb_geometry";"2";"32767";"GEOMETRY"
"8009194";"''";"public";"NHDFlowline";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012333";"''";"public";"NHDLine";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012359";"''";"public";"NHDLineEventFC";"wkb_geometry";"2";"32767";"GEOMETR
Y"
"8012346";"''";"public";"NHDPoint";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012372";"''";"public";"NHDPointEventFC";"wkb_geometry";"2";"32767";"GEOMET
RY"
"8009181";"''";"public";"NHDWaterbody";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012385";"''";"public";"Region";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012436";"''";"public";"Subbasin";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012417";"''";"public";"Subregion";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012480";"''";"public";"Subwatershed";"wkb_geometry";"2";"32767";"GEOMETRY"
"8012467";"''";"public";"Watershed";"wkb_geometry";"2";"32767";"GEOMETRY"
However, several of the tables, but not all, have empty wkb_geometry
columns. In addition a couple of tables have incompletely translated
wkb_geometry with only some rows containing data. There were no errors shown
in the output.
I then tried using an ODBC DSN for a specific table:
ogr2ogr -f PostgreSQL -update -overwrite PG:"user=user dbname=NHD
host=localhost password=password port=5432" PGeo:NHD Basin
but the resulting Basin.wkb_geometry was still empty.
The NHD geodatabase MS Access mdb file does have long binary data in the
Shape column. I verified that the geometry Shape column is not empty using
my own geodatabase to svg translator. The resulting <path> elements appear
to be valid?
Has anyone else run into this type of problem using ogr to access a
geodatabase? Perhaps I'm missing a required parameter?
Thanks
Randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070205/df73a772/attachment.html>
More information about the postgis-users
mailing list