GeoConstraint allows invalid POINT values

Created on 1 June 2023, about 1 year ago

Problem/Motivation

This module assumes lon comes before lat in POINT. E.g. Sydney's coordinates are roughly 31 degrees south, 151 degrees east. Most people think in terms of lat coming before lon, so would mistakenly enter POINT (-31 151) when it should be POINT(151 -31). The first should fail validation but it doesn't.

I don't think anyone's ever noticed this before because the lat lons entered via the UI don't seem to use the constraint for validation but their own custom solution. Ideally they would use the same but that's out of scope for this issue.

Steps to reproduce

Create test showing that it fails with the above coordinates.

Proposed resolution

Fix constraint to make it more robust.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

achap πŸ‡¦πŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024