Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
charvolant opened this issue May 27, 2020 · 1 comment
Closed
Labels

Comments

@charvolant
Copy link
Contributor

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

@charvolant charvolant added the bug label May 27, 2020
@peggynewman
Copy link

Closed as migrated to pipelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants