Find all city furniture features whose envelope geometry is within the distance of 80 meters from a given point location
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>
<dWithin>
<point>
<pos>30 10</pos>
</point>
<distance uom="m">80.0</distance>
</dWithin>
</filter>
</query>
SQL Query for 3DCityDB v4 (PostgreSQL)
select
b.id,
b.objectclass_id,
b.gmlid
from
citydb.cityobject b
where
b.objectclass_id = 26
and ST_DWithin(b.envelope, 'SRID=3857;POINT(30 10)', 80.0) = 'TRUE'
SQL Query for 3DCityDB v5 (PostgreSQL)
select
ftr.id,
ftr.objectclass_id,
ftr.gmlid
from
feature ftr
where
ftr.objectclass_id = 26
and ST_DWithin(ftr.envelope, 'SRID=5254;POINT(6.1 3.55)', 80.0)