Bug report #7600

$geometry parameter does not expand to layer geometry column name

Added by Jeremy Palmer over 11 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WFS
Affected QGIS version:master Regression?:No
Operating System:ALL Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:16530

Description

Within the QGIS Expression Builder the $geometry parameter does not expand to layer geometry column name when using WFS. The QGIS Expression to OGC filter always use 'geometry' as the name.

example with layer geometry column "is the_geom"

QGIS Expression: "intersects($geometry, geomFromWKT('POINT (5 6)'))"

OGC XML:

<ogc:Filter>
<ogc:Intersects>
<ogc:PropertyName>*geometry*</ogc:PropertyName>
<gml:Point><gml:coordinates cs=\\",\\" ts=\\" \\">5.0,6.0</gml:coordinates></gml:Point>
</ogc:Intersects>
</ogc:Filter>

History

#1 Updated by Jürgen Fischer about 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#2 Updated by Even Rouault over 8 years ago

The issue seems to be resolved in master

I used the following layer :
http://demo.opengeo.org/geoserver/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=ne:ne_10m_admin_0_countries&SRSNAME=EPSG:4326

and expression :
intersects($geometry, geomFromWKT('POINT (2 49)'))

and it selected France as expected.

The geometry name of this layer is the_geom

#3 Updated by Even Rouault over 8 years ago

Update: my above comment only applies after adding a WFS layer and using an expression in the table

The issue still exists when adding a filter to a not yet loaded layer.

#4 Updated by Giovanni Manghi about 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#5 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF