[Qgis-user] Strange filter behavior

Paulius Litvinas paulius at infoera.lt
Tue Oct 14 01:44:13 PDT 2014


Hello list,

 

I found that the filter for value relation is working strange.

 

This expresion is equal (filter returns true): 

$geometry = geomFromWKT('LINESTRING(390364.82999985886272043
6126622.90999916009604931, 390354.81999995314981788
6126636.05999972019344568, 390385.25999995262827724
6126666.33999972231686115, 390437.70999995339661837
6126716.58999972138553858, 390504.5499999534804374
6126735.08999972138553858, 390559.1499999538064003
6126749.38999972492456436, 390612.05999990634154528
6126763.44999945163726807)')

As WKT is calculated from $geometry of that line.

 

But if I try this expresion with added buffer of 1 meter for both sides for
the same feature:

 

buffer($geometry, 1) =
buffer(geomFromWKT('LINESTRING(390364.82999985886272043
6126622.90999916009604931, 390354.81999995314981788
6126636.05999972019344568, 390385.25999995262827724
6126666.33999972231686115, 390437.70999995339661837
6126716.58999972138553858, 390504.5499999534804374
6126735.08999972138553858, 390559.1499999538064003
6126749.38999972492456436, 390612.05999990634154528
6126763.44999945163726807)'),1)

 

it returns false.

 

The Idea is to use the spatial filter to query points that are in buffer of
line.

 

I use the following expresion:

 

 

within( geomFromWKT('POINT('|| "x" || ' ' || "y"|| ')'), buffer($geometry),
1) = 1      -  but this returns false.

„x“ and „y“ are coordinates of point

 

while such works fine:

 

within( geomFromWKT('POINT('|| "x" || ' ' || "y"|| ')'),
buffer(geomFromWKT('LINESTRING(390364.82999985886272043
6126622.90999916009604931, 390354.81999995314981788
6126636.05999972019344568, 390385.25999995262827724
6126666.33999972231686115, 390437.70999995339661837
6126716.58999972138553858, 390504.5499999534804374
6126735.08999972138553858, 390559.1499999538064003
6126749.38999972492456436, 390612.05999990634154528
6126763.44999945163726807)'),1) ) = 1

 

there $geometry = geomFromWKT('LINESTRING(390364.82999985886272043
6126622.90999916009604931, 390354.81999995314981788
6126636.05999972019344568, 390385.25999995262827724
6126666.33999972231686115, 390437.70999995339661837
6126716.58999972138553858, 390504.5499999534804374
6126735.08999972138553858, 390559.1499999538064003
6126749.38999972492456436, 390612.05999990634154528
6126763.44999945163726807)')

 

any ideas for such strange behaviour?

 

 

 

 

Sincerely,

Paulius Litvinas

GIS consultant

line


map

S. Žukausko str. 17,
LT-08234 Vilnius, Lithuania 

telephone

Tel. + 370 5 278 8456
Mob. +370 656 10 089 

mail_and_earth

 <mailto:paulius at infoera.lt> paulius at infoera.lt
 <http://www.infoera.lt/> www.infoera.lt 

info_era_autodesk

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141014/54843197/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2383 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141014/54843197/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 353 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141014/54843197/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 344 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141014/54843197/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 614 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141014/54843197/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 8297 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141014/54843197/attachment-0003.png>


More information about the Qgis-user mailing list