3dcitydb / web-feature-service

OGC Web Feature Service 2.0 interface for the 3D City Database
Apache License 2.0
30 stars 13 forks source link

How to use CityObjectGroups #14

Closed DerLinne closed 6 days ago

DerLinne commented 1 month ago

We are currently trying to use to CityObjectGroups to bundle different datasets with the 3DCityDB.

We have tried several ways to create this CityObjectGroups (Creating an Entry with Objectclass 23, assigning objects to it, ...) in the database, but no way was successful.

Is there any documentation or example, what to do, that CityObjectGroups are readable over the WFS or better usable as a filter criteria over the WFS?

Thanks in Advance.

clausnagel commented 1 month ago

CityObjectGroups should be fully supported by the WFS. The easiest way to understand how CityObjectGroups are stored and represented in the database is to import a valid CityGML file containing a CityObjectGroup. Regarding filter criteria, it would be required to understand what exactly you want to do.

DerLinne commented 2 weeks ago

Thanks for the reply. In the meantime we managed to get the right data in the database and we can read the CityObjectGroup itself using the wfs.

What I mean with filter is: Is there a way to get all buildings, that belong to one CityObjectGroup - we can get all buildings, but filtering them by a releated object is what we did not find in the documentation. So if there is a way, a hint would be appreciated

clausnagel commented 2 weeks ago

Well, no, you cannot define queries involving multiple feature types. The WFS 2.0 specification generally supports such joins. But we have not implemented this capability for the 3DCityDB WFS.

You would have to build a two-step process. First, query your CityObjectGroup and parse the gml:ids of the group members in your client. Second, query all buildings using the gml:id list as filter.

clausnagel commented 6 days ago

Closing as the initial question was answered.