Discussion:
[Community] convert between ogc and ogr filters
Jachym Cepicky
2011-07-31 11:37:36 UTC
Permalink
hi,

is there a way, how to easy parse OGC Filter and eventually transform
it to OGR filter?

Example

<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo
matchCase="true"><ogc:PropertyName>VLAST</ogc:PropertyName><ogc:Literal>obce</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>

to

VLAST = 'obce'

Thanks

Jachym
--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp
Kralidis,Tom [Ontario]
2011-08-01 14:03:25 UTC
Permalink
Jachym: there's a Filter parser in pycsw (https://pycsw.svn.sourceforge.net/svnroot/pycsw/trunk/server/fes.py) which does this (transforms OGC filters to SQL). Note that there is work to do to support infinite level of recursion or And/Or/Not statements (currently goes two levels deep). Any enhancements are welcome!

..Tom


-----Original Message-----
From: community-bounces at lists.gispython.org on behalf of Jachym Cepicky
Sent: Sun 31-Jul-11 07:37
To: community at lists.gispython.org
Subject: [Community] convert between ogc and ogr filters

hi,

is there a way, how to easy parse OGC Filter and eventually transform
it to OGR filter?

Example

<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo
matchCase="true"><ogc:PropertyName>VLAST</ogc:PropertyName><ogc:Literal>obce</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>

to

VLAST = 'obce'

Loading...