Log Message: |
Support views in addition to normal tables in the postgis shapestore
* Thuban/Model/postgisdb.py
(PostGISShapeStore._fetch_table_information): Add a fallback for
the case where the table name is not in the geometry_columns
table. This is usually the case for views. Also, set
self.shapestore here.
(PostGISShapeStore.ShapeType): No need to query the database all
the time. The shape type is now determined in
_fetch_table_information
* test/postgissupport.py (PostgreSQLServer.new_postgis_db)
(PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
New parameter to specify views.
(PostGISDatabase.has_data): Also compare the views. New views
parameter
(PostGISDatabase.initdb): Create the views.
(PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
view
* test/test_postgis_db.py
(TestPostGISShapestorePointFromViews): New. Test a
PostGISShapeStore with a view
(TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
the geometry_column explicitly to test whether that works
|