Find all buildings having at least a door whose address contains the street name ‘Einbahnstrasse’
XML Query
<query xmlns="http://www.3dcitydb.org/importer-exporter/config">
<typeNames>
<typeName xmlns:bldg="http://www.opengis.net/citygml/building/2.0">bldg:Building</typeName>
</typeNames>
<filter>
<propertyIsEqualTo>
<valueReference>bldg:boundedBy/schema-element(bldg:_BoundarySurface)/bldg:opening/bldg:Door/bldg:address/core:Address/citydb:street</valueReference>
<literal>Einbahnstrasse</literal>
</propertyIsEqualTo>
</filter>
</query>
SQL Query for 3DCityDB v4 (PostgreSQL)
select
distinct b.id,
b.objectclass_id,
b.gmlid
from
citydb.building a
inner join citydb.cityobject b on a.id = b.id
inner join citydb.thematic_surface c on a.id = c.building_id
inner join citydb.opening_to_them_surface d on c.id = d.thematic_surface_id
inner join citydb.opening e on (
d.opening_id = e.id
and e.objectclass_id = 39
)
inner join citydb.address f on e.address_id = f.id
where
b.objectclass_id = 26
and f.street = 'Einbahnstrasse'