add a filter parsing alias of '!=' for '<>' - closes #427
This commit is contained in:
parent
5fccc3ae62
commit
ba9376626a
3 changed files with 50 additions and 0 deletions
|
@ -15,12 +15,16 @@ For a complete change history, see the SVN log.
|
|||
Mapnik 0.6.2 Release
|
||||
--------------------
|
||||
|
||||
- Filters: Add support for '!=' as an alias to '<>' for not-equals filters (avoids <>) (r1326) (#427)
|
||||
|
||||
- Gdal Plugin: Add support for Gdal overviews, enabling fast loading of > 1GB rasters (r1321) (#54)
|
||||
|
||||
- PostGIS Plugin: Add bbox substitution ability in sql query string (r1292) (#415)
|
||||
|
||||
- PostGIS Plugin: Throw and report errors if SQL execution fails (r1291) (#363)
|
||||
|
||||
- Python: Added 'mapnik.has_pycairo()' function to test for pycairo support (r1278) (#284)
|
||||
|
||||
- PostGIS Plugin: Added missing support for BigInt(int8) postgres datatypes (r1250) (#384)
|
||||
|
||||
|
||||
|
@ -68,6 +72,8 @@ Mapnik 0.6.1 Release
|
|||
|
||||
- Python: Pickling support for raster_symbolizer (r1154) (#345)
|
||||
|
||||
- Python: Added 'mapnik.has_cairo()' function to test for cairo support (r1152) (#284)
|
||||
|
||||
- Python: Exposed dash_array get method (r1151) (#317)
|
||||
|
||||
- Python: Pickling support for Coord objects (#345)
|
||||
|
|
|
@ -473,6 +473,8 @@ namespace mapnik
|
|||
equation = relation >> *( ( L'=' >> relation)
|
||||
[compose_filter<FeatureT,mapnik::equals<value> >(self.filters,self.exprs)]
|
||||
| ( L"<>" >> relation)
|
||||
[compose_filter<FeatureT,not_equals<value> >(self.filters,self.exprs)]
|
||||
| ( L"!=" >> relation)
|
||||
[compose_filter<FeatureT,not_equals<value> >(self.filters,self.exprs)]);
|
||||
|
||||
cond_expr = equation | (expression)[compose_boolean_filter<FeatureT>(self.filters,self.exprs)];
|
||||
|
|
42
tests/data/good_maps/unique_filter_map.xml
Normal file
42
tests/data/good_maps/unique_filter_map.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Map srs="+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +units=m +no_defs" bgcolor="rgba(0,0,0,0)">
|
||||
<Style name="poly20090929162130952_style">
|
||||
|
||||
<Rule>
|
||||
<Filter>([EAS_ID]!=158)</Filter>
|
||||
<PolygonSymbolizer>
|
||||
<CssParameter name="fill">blue</CssParameter>
|
||||
</PolygonSymbolizer>
|
||||
<LineSymbolizer>
|
||||
<CssParameter name="stroke">blue</CssParameter>
|
||||
<CssParameter name="stroke-width">4</CssParameter>
|
||||
</LineSymbolizer>
|
||||
</Rule>
|
||||
|
||||
<Rule>
|
||||
<Filter>([EAS_ID]<>158)</Filter>
|
||||
<PolygonSymbolizer>
|
||||
<CssParameter name="fill">green</CssParameter>
|
||||
</PolygonSymbolizer>
|
||||
<LineSymbolizer>
|
||||
<CssParameter name="stroke">green</CssParameter>
|
||||
<CssParameter name="stroke-width">2</CssParameter>
|
||||
</LineSymbolizer>
|
||||
</Rule>
|
||||
|
||||
<Rule>
|
||||
<ElseFilter />
|
||||
<PolygonSymbolizer>
|
||||
<CssParameter name="fill">red</CssParameter>
|
||||
</PolygonSymbolizer>
|
||||
</Rule>
|
||||
|
||||
</Style>
|
||||
<Layer name="poly20090929162130952" srs="+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +units=m +no_defs" status="1" clear_label_cache="1" queryable="1">
|
||||
<StyleName>poly20090929162130952_style</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">../../data/shp/poly.shp</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
</Map>
|
Loading…
Reference in a new issue