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

Randy,

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,
--=20
---------------------------------------+---------------------------------=
-----
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