pygeofilter
pygeofilter copied to clipboard
django like filter wont work for various wildcard chars
Status Quo
if a fes filter:
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Type</ogc:PropertyName>
<ogc:Literal>dataset</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsLike wildCard="*" singleChar="_" escapeChar="/">
<ogc:PropertyName>AnyText</ogc:PropertyName>
<ogc:Literal>*potentielle Evapotranspiration*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:And>
</ogc:Filter>
is converted to a django filter, the like query will result in a exact lookup for *potentielle Evapotranspiration*
This is cause the current like function does not take into account the wildCard
char. It will always use the hard coded %
char as wildcard.