[gdal-dev] Parsing s57 chart with GDAL.
Aryan Landi
aryan.landi at trelleborg.com
Thu Jan 19 05:50:21 PST 2023
Hi again,
I also do that. Here is the full code snippet that does not work.
#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 );
}
}
Den 19. jan. 2023 kl. 13.23 skrev Aryan Landi <aryan.landi at trelleborg.com<mailto:aryan.landi at trelleborg.com>>:
CAUTION: External Mail
Hi all,
I am unable to use the GDAL/OGR S57 driver to parse s57 charts. According to the official tutorial at https://gdal.org/tutorials/vector_api_tut.html<https://ddec1-0-en-ctp.trendmicro.com/wis/clicktime/v1/query?url=https%3a%2f%2fgdal.org%2ftutorials%2fvector%5fapi%5ftut.html&umid=0557ffb0-6eb1-4f6b-80d6-1131e1983409&auth=b6670b9751c5c90ededae23711566d84a7ddb070-b06f87e0005818871cbf737adb302076abd31b48>, I should be able to do something like:
GDALDataset *poDS;
poDS = (GDALDataset*) GDALOpenEx( “s57Chart.000", GDAL_OF_VECTOR, NULL, NULL, NULL );
However, poDS becomes NULL. On further investigation, invoking the gdalinfo command on a file returns
ERROR 4: `s57Chart.000' not recognized as a supported file format.
gdalinfo failed - unable to open ’s57Chart.000’.
If I use the ogrinfo command, the result is correct.
So it seems that GDALOpenEx is unable to locate the correct driver, which is shipped with GDAL.
Anyone who knows how to parse a s57 chart using GDAL 3.7?
Best regards,
Aryan Mohammadi Landi.
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
https://ddec1-0-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2flists.osgeo.org%2fmailman%2flistinfo%2fgdal%2ddev&umid=0557ffb0-6eb1-4f6b-80d6-1131e1983409&auth=b6670b9751c5c90ededae23711566d84a7ddb070-22e347d19f280b9bf24a6d423d3574fa65c3ae72
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230119/2a724826/attachment.htm>
More information about the gdal-dev
mailing list