WSL/SLF GitLab Repository

Skip to content
Snippets Groups Projects

Fixing the case where rounding errors make the isSameGeolocalization test...

Fixing the case where rounding errors make the isSameGeolocalization test fail, even though the two grids are basically the same Geolocalization.

Example:

the following test for two grids failed, even though it's clear that it's related to floating point rounding errors (see bold)

  • grid2D.getNx()==target.grid2D.getNx() ---> 486 == 486
  • grid2D.getNy()==target.grid2D.getNy() ---> 200 == 200
  • llcorner: Altitude -999 Lat/Long (-4°45'0.000000" , -12°15'0.000000") Lat/Long (-4.7500000000 , -12.2500000000) X/Y_coords (-2416423 , 11129371) Projection PROJ (3031) EPSG 3031
  • target.llcorner: Altitude -999 Lat/Long (-4°45'0.000000" , -12°15'0.000000") Lat/Long (-4.7500000000 , -12.2500000000) X/Y_coords (-2416423 , 11129371) Projection PROJ (3031) EPSG 3031
  • cellsize==target.cellsize ---> -999 != 5528.85
  • ur_lat==target.ur_lat ---> 5.20000000000000017764 != 5.19999980926513671875
  • ur_lon==target.ur_lon ---> 12.00000000000000177636 != 12.00000000000000000000

Merge request reports

Checking pipeline status.

Approved by

Merged by Mathias BavayMathias Bavay Aug 23, 2021 (Aug 23, 2021 7:10am UTC)

Merge details

  • Changes merged into master with c14e238d.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading