3dcitydb / 3dcitydb-web-map

Cesium-based 3D viewer and JavaScript API for the 3D City Database
Apache License 2.0
359 stars 122 forks source link

Settings for showing thematic data using PostgREST #74

Closed BSchweiger closed 1 year ago

BSchweiger commented 1 year ago

Hi!

By trying to connect thematic data to the objects shown in the web map client, I never see any information: just "Loading feature information ..." I have created a role as well as user in postgresql who have access and reading rigths to the LoD2 schema and all tables. PostgREST seems to work, since I get all the information using a terminal. The citygml-data was exported by the 3DCityDB Importer/Exporter as KML-files and is added 'successfully' from local storage as a layer in the web map client.

What information are needed to see thematic data in the web map client using PostgREST?

My - probably relevant - inputs look like this at the moment: URL: http://localhost:8000/3dwebclient/xyz.kml thematicDateUrl: http://localhost:3000/cityobject - Which tables should I specify? Is it possible to state all tables? Do I have to enter curl, Invoke-RestMethod, etc.? Thematic Data Source: PostgreSQL REST API cityobjects.JsonUrl: http://localhost:8000/3dwebclient/zyx_MasterJSON.json

Thank you very much in advance!

Son-HNguyen commented 1 year ago

Hi,

the thematicDataUrl should point to your table or view that you'd like to expose, for example:

https://example.com:3000/<table_name>

This table or view must be structured either as a "horizontal" or a "vertical" table and must have the correct order of columns and column names. Since most of the tables from the 3DCityDB contain much more information than just for some thematic fields required in the web client, you could use a (materialized) view instead. This way you can define the order of the column and column names accordingly. Please refer to the documentation and the release notes for more information on the structure of these tables and views required in the web client: https://3dcitydb-docs.readthedocs.io/en/latest/webmap/online-spreadsheet.html# https://github.com/3dcitydb/3dcitydb-web-map/releases/tag/v1.9.0

I hope that helps.