[Gdal-dev] RE: ogr2ogr geodatabase translation

Randy George rkgeorge at cadmaps.com
Wed Feb 7 18:41:49 EST 2007


Hi,

 

            Following up on the USGS NHD data ogr2ogr translation.

 

            Another mail list indicated "19 is a polygon with M and Z
values."  but after checking further the geodatabase shape field appears to
return a type that matches the PolygonM signature rather than PolygonZ. In
either case the ogr2ogr seems to skip the geometry for type 19. I attempted
using -nlt to force the geometry to 2D without success.

 

    In addition there appears to be a shape type 9 in NHD
HYDRO_NET_Junctions, which seems to correspond to PointM shape type 21?
Again ogr2ogr evidently skips this geometry.

 

            Does anyone know where documentation can be found for these
newer ESRI shape types?

 

Thanks

Randy

            

 

  _____  

From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Randy George
Sent: Tuesday, February 06, 2007 12:45 PM
To: gdal-dev at lists.maptools.org
Subject: RE: [Gdal-dev] RE: ogr2ogr geodatabase translation

 

Hi,

 

            Revisiting the problem I'm experiencing using ogr2ogr 1.4.0 in
FWTools 1.1.3 to translate USGS NHD data into PostGIS.

 

Looking at a typical NHDArea table of the geodatabase mdb it appears that
the Shape field's internal 'Shape Type' is listed as 19. Unless there has
been a recent change, I don't think the shp format has a type 19. I ran a
test conversion to svg with my own translator forcing .shp type 19 to a type
5 (Polygon) and I get valid polygon <paths>?

 

Has ESRI added an additional "Shape Type" to the list? 

 

If shp type 19 is unknown to the ogr translator that would explain the empty
geometry columns and sporadic empty geometry fields.

 

thanks

randy

 

  _____  

From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Randy George
Sent: Wednesday, January 31, 2007 8:33 AM
To: gdal-dev at lists.maptools.org
Subject: [Gdal-dev] RE: ogr2ogr geodatabase translation

 

 

Hi,

 

            I am attempting to translate some NHD data from
ftp://nhdftp.usgs.gov/SubRegions/ using ogr2ogr 1.4.0 in FWTools 1.1.3, but
having some problems.

 

The NHD data comes as ESRI geodatabase .mdb files. I was excited to see that
ogr2ogr now supportsESRI geodatabase mdb format and ran the following:

 

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, not all, have empty wkb_geometry columns. In
addition a couple of tables have incompletely translated wkb_geometry with
only some rows containing data.

 

I then tried using an ODBC DSN:

ogr2ogr -f PostgreSQL -update -overwrite PG:"user=user dbname=NHD
host=localhost password=password port=5432" PGeo:NHD Basin 

but the Basin.wkb_geometry was still empty. The Access mdb file appears to
have long binary data in a Shape column.

 

Perhaps individual tables need to be translated with a specified geom
column? 

 

Is a log generated by an ogr2ogr translation?

 

Thanks

randy

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070207/e12cf8eb/attachment.html


More information about the Gdal-dev mailing list