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

Convert device table location columns to PostGIS geometry datatype #79

Merged
merged 6 commits into from
Jun 7, 2024

Conversation

dajtxx
Copy link
Collaborator

@dajtxx dajtxx commented Jun 7, 2024

GIS apps such as QGIS do not recognise the PostgreSQL point datatype as a valid geometry type.

This PR changes the db container to use a PostGIS image, and converts the location column in the device tables to be of type geometry('point') with SRID 4283 to match up with the SCMN.

This choice may be short-sighted - it is only suitable for Australian users.

A subsequent change could be to parameterise the SRID via an env var or similar.

The webapp, REST API, and DAO code are all updated to suit.

The backoff annotations have also been removed from the DAO. So far in practice they have not been necessary and if the DB falls over, the rest of the system probably doesn't work either due to the fact they're all currently on the same server.

dajtxx and others added 6 commits June 6, 2024 09:06
…ommand via the --properties flag.

DAO & RestAPI updated to handle PostGIS geometry location column.

Removed backoff annotations from DAO, they have not been useful.

Changed errors raised by the DAO to be ValueErrors when parameter validation fails.
@dajtxx dajtxx merged commit ab2b821 into master Jun 7, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant