DPIclimate / broker

3 stars 3 forks source link

Convert device table location columns to PostGIS geometry datatype #79

Closed dajtxx closed 1 month ago

dajtxx commented 1 month ago

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.