[gdal-dev] convert s57 to shp via ogr2ogr?

Frank Warmerdam warmerdam at pobox.com
Sat Apr 17 10:28:52 EDT 2010

Randy wrote:
> Hi list,
> I=A1=AFd like to know whether ogr2ogr could convert s57 files to ERSI s=
> file(.shp)?
> I got some errors during converting:
> ERROR 6:Can=A1=AFt create fields of type StringList on shapefile layers=
> =A1=AD=A1=AD=A1=AD=A1=AD=A1=AD
> Same as above
> ERROR 1=A3=BAAttempt to write non-polygon <LINESTRING> geometry to type=
> shapefile
> =A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD.
> Same as above
> =20
> And I use the command:=A1=B1ogr2ogr =A8Cskipfailures  -f =A1=B0ESRI Sha=
pefile=A1=B1 out=20
> US1AK90M.000=A1=B1.
> Is there anything wrong about my command?
> Or the ogr2ogr have some defect?


The first message indicates that there are some fields of
a type that cannot be translated to shapefiles directly.  With
-skipfailures they should be just skipped.

The second message is caused when an S-57 layer has a mixture
of geometry types.  Shapefiles can only have one geometry
type (ie. line or point) per layer.   The traditional way to
address this is to do two translations for layers with a mixture
of geometries, one for each geometry type.

So you command is reasonable, but to translate S-57 the best
that is possible you will likely need to do the translation
one layer at a time,and establish what geometry types each
has.  Rather tedious!

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox=
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