Skip to content

Commit

Permalink
updated srtm download and related gdal_util functions messages a bit,…
Browse files Browse the repository at this point in the history
… for issue #529
  • Loading branch information
latwood committed Sep 10, 2024
1 parent 345bce3 commit 7ef8623
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ninja/gdal_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ bool GDALWarpToUtm (const char* filename, GDALDatasetH& hSrcDS, GDALDatasetH& hD
CPLPopErrorHandler();
if(eErr != CE_None)
{
CPLError( CE_Failure, CPLE_AppDefined, "GDALSuggestedWarpOutput failed." );
return false;
}
GDALDestroyGenImgProjTransformer(hTransformArg);
Expand All @@ -929,6 +930,7 @@ bool GDALWarpToUtm (const char* filename, GDALDatasetH& hSrcDS, GDALDatasetH& hD

if(hDstDS == NULL)
{
CPLError( CE_Failure, CPLE_AppDefined, "Failed to create gdal dataset." );
return false;
}

Expand Down Expand Up @@ -1018,6 +1020,7 @@ bool GDALWarpToUtm (const char* filename, GDALDatasetH& hSrcDS, GDALDatasetH& hD
}
if(nNoDataCount > 0)
{
CPLError( CE_Failure, CPLE_AppDefined, "Failed to fill all no data values." );
return false;
}

Expand Down
1 change: 1 addition & 0 deletions src/ninja/srtmclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ SURF_FETCH_E SRTMClient::FetchBoundingBox( double *bbox, double resolution,
bool rc = GDALWarpToUtm( filename, hDS, hUtmDS);
if(rc != true)
{
CPLError( CE_Failure, CPLE_AppDefined, "Could not warp image, download failed." );
return SURF_FETCH_E_IO_ERR;
}

Expand Down

0 comments on commit 7ef8623

Please sign in to comment.