[Gdal-dev] OGR Attribute filter expression limitation

Frank Warmerdam warmerdam at pobox.com
Mon Jan 30 09:20:21 EST 2006


On 1/29/06, Szekeres Tamás <szekeres.tamas at freemail.hu> wrote:
> Does OGR support filtering by fields having field names in both side of an
> operator such as:
>
> (myfield1 > myfield2) and (myfield2 > 0)
>
>
>
> Both of the fields are numeric.
>
>
>
> I seems this type of expression is not supported. What restrictions do I
> have to take into account then?

Tamas,

I'm afraid it is a limitation of the half-baked SQL support
in OGR that fieldnames can only be on the left side of the
binary operators.

So there is way of comparing two fields in an expression.

It would be a fair amount of work to fix this, and I worry
about the logic to sinking alot of time into replicating alot
of SQL expression handling.  I wonder if I wouldn't be better
off looking for a real sql engine someday.

Best regards,

--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list