Skip to content

Commit

Permalink
Merge branch 'OSGeo:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
a0x8o authored Jun 4, 2024
2 parents 3882146 + 2cc9f95 commit 6fe3333
Show file tree
Hide file tree
Showing 160 changed files with 3,900 additions and 1,546 deletions.
7 changes: 6 additions & 1 deletion alg/gdaltransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,12 @@ static void InsertCenterLong(GDALDatasetH hDS, OGRSpatialReference *poSRS,
adfGeoTransform[0] + nXSize * adfGeoTransform[1] +
nYSize * adfGeoTransform[2]));

if (dfMaxLong - dfMinLong > 360.0)
const double dfEpsilon =
std::max(std::fabs(adfGeoTransform[1]), std::fabs(adfGeoTransform[2]));
// If the raster covers more than 360 degree (allow an extra pixel),
// give up
constexpr double RELATIVE_EPSILON = 0.05; // for numeric precision issues
if (dfMaxLong - dfMinLong > 360.0 + dfEpsilon * (1 + RELATIVE_EPSILON))
return;

/* -------------------------------------------------------------------- */
Expand Down
Loading

0 comments on commit 6fe3333

Please sign in to comment.