Skip to content

Commit

Permalink
NITF: remove use of OGRDataSourceH
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Sep 19, 2024
1 parent 79d3f20 commit d7feb0b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frmts/nitf/nitfdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,14 @@ int main(int nArgc, char **papszArgv)

if (NITFDESExtractShapefile(psDES, szRadix))
{
OGRDataSourceH hDS;
GDALDatasetH hDS;
snprintf(szFilename, sizeof(szFilename), "%s.SHP", szRadix);
hDS = OGROpen(szFilename, FALSE, NULL);
hDS = GDALOpenEx(szFilename, GDAL_OF_VECTOR, NULL, NULL,
NULL);
if (hDS)
{
int nGeom = 0;
OGRLayerH hLayer = OGR_DS_GetLayer(hDS, 0);
OGRLayerH hLayer = GDALDatasetGetLayer(hDS, 0);
if (hLayer)
{
OGRFeatureH hFeat;
Expand All @@ -668,7 +669,7 @@ int main(int nArgc, char **papszArgv)
OGR_F_Destroy(hFeat);
}
}
OGR_DS_Destroy(hDS);
GDALClose(hDS);
}
}

Expand Down

0 comments on commit d7feb0b

Please sign in to comment.