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

Frank Warmerdam warmerdam at pobox.com
Sat Apr 17 22:18:49 EDT 2010

Randy wrote:
> Hi Frank,
> Thanks for your response!
>> 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,
> The ogr2ogr has "[-clipsrclayer layer]" which seems could do translation
> one layer at a time,but this means I should get the layername via
> "ogrinfo" first,right?


That switch is not appropriate to just transform a single layer.
Do something like:

ogr2ogr -skipfailures wrecks_p.shp -nlt point GB4X0000.000 wrecks
ogr2ogr -skipfailures wrecks_l.shp -nlt linestring GB4X0000.000 wrecks

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