Closed calvinjlin closed 3 months ago
Thanks @calvinjlin for proposing this PR. Development in this repo is not really active anymore. You should try this work if you want to use the 3DCityDB with QGIS: https://github.com/tudelft3d/3DCityDB-Tools-for-QGIS
Not sure if this repo is still active, but here goes:
It looks like between version 3 and 4, the version function was changed.
CityDB version 3
CityDB version 4
When a v4 db is loaded, a silent error occurs where the program just returns a -1 instead of stopping. https://github.com/3dcitydb/3dcitydb-qgis-explorer/blob/6ed4bf022f7c4b883a7e35c73df9cca16c62d538/db/postgresql.py#L132-L141
However, due to the error, further SQL transactions are blocked until a rollback is executed, and so the next sql call to retrieve the citydb srs fails as described in #6.
"current transaction is aborted, commands ignored until end of transaction block"
This PR adds code to handle version retrieval for v3 and v4, as well as connection rollbacks to the exception handling. However, there maybe be other api changes in v4 that have not been addressed.