DataONEorg / d1_cn_index_processor

The CN index processor component
0 stars 1 forks source link

Incorrect geohash calculated for bbox crossing IDL #13

Open gothub opened 3 years ago

gothub commented 3 years ago

See issue https://github.com/NCEAS/metacat/issues/1488 for a complete explanation.

gothub commented 3 years ago

The GeohashConverter used a library that uses the bounding box coordinates to calculate the bbox center point. This center point is then used to calcuate the geohash values. The library was incorrectly calculating the center point if the bbox intersected a hypothetical line at -180W (or 180 east if you like).

The fix was to calculate the bounding box center point manually, and not use the library calculate. The library is still used to calculate the geohash values from the center point.

This fix has been tested in the branch, then merged to develop_2.3 and tested there.

gothub commented 3 years ago

Note that datasets that were affected by this bug need to be reindexed after the fix is installed.