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

Remove History.lat and History.lon #199

Open
jameshiebert opened this issue Jan 12, 2024 · 1 comment
Open

Remove History.lat and History.lon #199

jameshiebert opened this issue Jan 12, 2024 · 1 comment

Comments

@jameshiebert
Copy link
Contributor

A well normalized set of tables should have one single source of information. Unfortunately, the meta_history table has both numeric lat/lon attributes in addition to a PostGIS geometry object. This has sown confusion, in that data managers tend to forget to update the geometry object:

crmp=> select count(*) from meta_history where the_geom is NULL and (lat is not null and lon is not null);
 count 
-------
   183
(1 row)

And even our own developer have used lat/lon instead of the geometry.

lat and lon should be removed.

@rod-glover
Copy link
Contributor

rod-glover commented Jan 12, 2024

Yes, that would be me for sure -- in many places, including the frontends, which will also need to be updated. It was not clear to me what the use (or reliability) of geometry was, and all existing code I encountered did not use it.

Therefore I add the following much broader suggestion: Document table columns better. Their names alone are frequently not sufficient. Let's look into whether that documentation can be part of the SQLAlchemy column definition so that it makes it into the database proper as well. See #200

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

No branches or pull requests

2 participants