AtlasOfLivingAustralia / biocache-store

Occurrence processing, indexing and batch processing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Records with swapped latitude/longitude don't have them corrected.

charvolant opened this issue · comments

The code at

if (lat < -90 || lat > 90 || lon < -180 || lon > 180) {
//test to see if they have been inverted
if (lon >= -90 && lon <= 90 && lat >= -180 && lat <= 180) {
assertions += QualityAssertion(INVERTED_COORDINATES, "Assume that coordinates have been inverted. Original values: " +
processed.location.decimalLatitude + "," + processed.location.decimalLongitude)
val tmp = processed.location.decimalLatitude
processed.location.decimalLatitude = processed.location.decimalLongitude
processed.location.decimalLongitude = tmp
//coordinates are not out of range:
assertions += QualityAssertion(COORDINATES_OUT_OF_RANGE, PASSED)
} else {
suggests that the lat/long will be swapped back if obviously swapped. However, this doesn't seem to happen.

Instead, a swapped coordinates flag is included but no coordinates out of range flag.
test-lat-long.csv.zip

Closed as migrated to pipelines.