[gdal-dev] ogr2ogr on SDTS/DLG creates wrong geometries

Frank Warmerdam warmerdam at pobox.com
Thu Mar 12 21:23:59 EDT 2009


Bill Zissimopoulos wrote:
> Hello, list:
> 
> I am using ogr2ogr to convert SDTS/DLG files to SHP for further 
> processing. The command I use is as follows:
> wget http://edcftp.cr.usgs.gov/pub/data/DLG/100K/S/seattle-w_WA/hydrography/1431327.HY.sdts.tar.gz
> tar xzf 1431327.HY.sdts.tar.gz
> ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:4326 . *CATD.DDF
> 
> This downloads the hydrography for the area west of Seattle, extracts it 
> and runs ogr2ogr to convert to Shapefile format.
> 
> Unfortunately some of the produced area geometries appear to be 
> problematic. For example, the result file PC04.shp contains some weird 
> "empty" geometries: these seem to be comprised of a big "fill" polygon 
> and a number of "hole" polygons such that their difference is an empty 
> geometry. The most obvious such example is the "sea" area behind 
> Bainbridge island (ENTITY_LAB 0500116).
> 
> I have verified that the original SDTS/DLG file renders properly under 
> software capable of reading such files (e.g. GlobalMapper). Is this a 
> problem with ogr2ogr or am I misusing/misunderstanding the tools?
> 

Bill,

I have downloaded the 1431327.HY file you referenced, but ogrinfo on
the PC04 layer does not show anything fundy about the 0500116 polygon.
I also converted to shapefile format and examined that with no odd results.
I neglected to reproject to EPSG:4326 I see.

Perhaps you could file a ticket on the issue, being very specific about
the software version and platform you worked on.  Also, please check if
a direct ogrinfo report on the original SDTS file shows a similar problem.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list