From ba9376626aa25fb35c67b36752ff47495689947c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 29 Sep 2009 23:40:40 +0000 Subject: [PATCH] add a filter parsing alias of '!=' for '<>' - closes #427 --- CHANGELOG | 6 ++++ include/mapnik/filter_parser.hpp | 2 ++ tests/data/good_maps/unique_filter_map.xml | 42 ++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 tests/data/good_maps/unique_filter_map.xml diff --git a/CHANGELOG b/CHANGELOG index b42e1c792..d3b4adc7f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/include/mapnik/filter_parser.hpp b/include/mapnik/filter_parser.hpp index 042177048..f74f9de1b 100644 --- a/include/mapnik/filter_parser.hpp +++ b/include/mapnik/filter_parser.hpp @@ -473,6 +473,8 @@ namespace mapnik equation = relation >> *( ( L'=' >> relation) [compose_filter >(self.filters,self.exprs)] | ( L"<>" >> relation) + [compose_filter >(self.filters,self.exprs)] + | ( L"!=" >> relation) [compose_filter >(self.filters,self.exprs)]); cond_expr = equation | (expression)[compose_boolean_filter(self.filters,self.exprs)]; diff --git a/tests/data/good_maps/unique_filter_map.xml b/tests/data/good_maps/unique_filter_map.xml new file mode 100644 index 000000000..839879609 --- /dev/null +++ b/tests/data/good_maps/unique_filter_map.xml @@ -0,0 +1,42 @@ + + + + + poly20090929162130952_style + + ../../data/shp/poly.shp + shape + + +