When calling dataset->GetProjectionRef, there is a chance it will return an empty string. This means the projection is invalid. If that's true, the grid map should not be loaded. Without validation, later code may be invalid.
Risks
Low, I tested it on the TIF and SRTM data files, and they both return valid projections.
Purpose
When calling
dataset->GetProjectionRef
, there is a chance it will return an empty string. This means the projection is invalid. If that's true, the grid map should not be loaded. Without validation, later code may be invalid.Risks
Low, I tested it on the TIF and SRTM data files, and they both return valid projections.
Reference
https://gdal.org/user/raster_data_model.html#coordinate-system