[gdal-dev] Reading s57 charts with GDAL

Aryan Landi aryan.landi at trelleborg.com
Mon Jan 30 00:43:39 PST 2023


Hi all,

I recently wrote about the difficulty of reading an s57 chart with GDAL following the standard example, as it seems that GDAL cannot find the s57 driver (the gdalinfo command also returns an error). I am curious to know, if this is a general problem, or if it is only my local GDAL installation. The example I try to run is the following:

#include "ogrsf_frmts.h"

int main()

{
GDALAllRegister();

GDALDataset *poDS;

poDS = (GDALDataset*) GDALOpenEx( "US5LA26M.000", GDAL_OF_VECTOR, NULL, NULL, NULL );
if( poDS == NULL )
{
printf( "Open failed.\n" );
exit( 1 );
}
}
.

When I run this, poDS is NULL and the program exits after printing the error message.
It happens on all the different s57 charts I have used. Charts are available from NOAA at https://charts.noaa.gov/ENCs/ENCs.shtml. It would be great to see, if someone can replicate this bug.

Best regards,

Aryan.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230130/1b58c5da/attachment.htm>


More information about the gdal-dev mailing list