[Qgis-user] variables in postgis filters

Matthias Kuhn matthias at opengis.ch
Tue Apr 5 01:36:26 PDT 2016



On 04/05/2016 10:20 AM, Sandro Santilli wrote:
> On Tue, Apr 05, 2016 at 06:09:12PM +1000, Nyall Dawson wrote:
> 
>> What's the topology issue you're hoping to solve with this?
> 
> Topology face layers from the TopoViewer (via DBManager plugin)
> use an expensive (and volatile, thus non-indexable) query to
> generate the geometry to be used for display. The provider generally
> applies the spatial filter to the geometry field, which in this case
> is ineffective.
> 
> I could fix this by adding the possibility to specify a
> "spatial-filter-field" which is different from the "spatial-display-field"
> (similarly could be done for obtaining the $area from the provider,
> for example).

That would be nice.
A possibility for this could be to allow compiling virtual fields which
can make use of the expression variables. A function for the topo query
could then be translated to a (server side) SQL query. The virtual field
could be visualized via the geometry generator symbology.

The missing pieces I see are
 * allow compiling virtual fields
 * expression compilation for functions
 * expression compilation for variables

Matthias




More information about the Qgis-user mailing list