From d03815276e19048238c5dc6ac9e953ab1db9873f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 14 Dec 2011 15:51:57 -0800 Subject: [PATCH 01/12] move the json config into the main script --- utils/mapnik-config/build.py | 14 -------------- utils/mapnik-config/mapnik-config.template.sh | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/utils/mapnik-config/build.py b/utils/mapnik-config/build.py index c86d3b5e7..8519051e0 100644 --- a/utils/mapnik-config/build.py +++ b/utils/mapnik-config/build.py @@ -28,20 +28,6 @@ CONFIG_FONTS='%(fonts)s' CONFIG_INPUT_PLUGINS='%(input_plugins)s' CONFIG_GIT_REVISION='%(git_revision)s' -CONFIG_JSON="{ - \\"prefix\\": \\"${CONFIG_PREFIX}\\", - \\"mapnik_libname\\": \\"${CONFIG_MAPNIK_LIBNAME}\\", - \\"mapnik_include\\": \\"${CONFIG_MAPNIK_INCLUDE}\\", - \\"mapnik_lib\\": \\"${CONFIG_MAPNIK_LIB}\\", - \\"version\\": \\"${CONFIG_MAPNIK_VERSION}\\", - \\"ldflags\\": \\"${CONFIG_MAPNIK_LDFLAGS}\\", - \\"dep_libs\\": \\"${CONFIG_DEP_LIBS}\\", - \\"other_includes\\": \\"${CONFIG_OTHER_INCLUDES}\\", - \\"fonts\\": \\"${CONFIG_FONTS}\\", - \\"input_plugins\\": \\"${CONFIG_INPUT_PLUGINS}\\", - \\"git_revision\\": \\"${CONFIG_GIT_REVISION}\\", -}" - ''' def write_config(configuration,template,config_file): diff --git a/utils/mapnik-config/mapnik-config.template.sh b/utils/mapnik-config/mapnik-config.template.sh index ef62cdb86..c89bb3ef1 100755 --- a/utils/mapnik-config/mapnik-config.template.sh +++ b/utils/mapnik-config/mapnik-config.template.sh @@ -1,6 +1,20 @@ ## program below +CONFIG_JSON="{ + \"prefix\": \"${CONFIG_PREFIX}\", + \"mapnik_libname\": \"${CONFIG_MAPNIK_LIBNAME}\", + \"mapnik_include\": \"${CONFIG_MAPNIK_INCLUDE}\", + \"mapnik_lib\": \"${CONFIG_MAPNIK_LIB}\", + \"version\": \"${CONFIG_MAPNIK_VERSION}\", + \"ldflags\": \"${CONFIG_MAPNIK_LDFLAGS}\", + \"dep_libs\": \"${CONFIG_DEP_LIBS}\", + \"other_includes\": \"${CONFIG_OTHER_INCLUDES}\", + \"fonts\": \"${CONFIG_FONTS}\", + \"input_plugins\": \"${CONFIG_INPUT_PLUGINS}\", + \"git_revision\": \"${CONFIG_GIT_REVISION}\" +}" + usage() { cat < Date: Thu, 15 Dec 2011 17:18:22 -0800 Subject: [PATCH 02/12] Add missing break --- plugins/input/sqlite/sqlite_utils.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/input/sqlite/sqlite_utils.hpp b/plugins/input/sqlite/sqlite_utils.hpp index 1e3ede064..6fbe32b31 100644 --- a/plugins/input/sqlite/sqlite_utils.hpp +++ b/plugins/input/sqlite/sqlite_utils.hpp @@ -568,6 +568,7 @@ public: // PRAGMA table_info is used so here we assume the column is a string // which is a lesser evil than altogether dropping the column desc.add_descriptor(mapnik::attribute_descriptor(fld_name, mapnik::String)); + break; case SQLITE_BLOB: if (geometry_field.empty() From 6aefbd0d99369f2739d70e2c271bef6c83e67e49 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 16 Dec 2011 07:22:52 -0800 Subject: [PATCH 03/12] update tests as per #992 --- bindings/python/mapnik/printing.py | 8 ++++---- tests/data/good_maps/markers_symbolizer_lines.xml | 2 +- tests/data/good_maps/markers_symbolizer_points.xml | 14 +++++++------- tests/data/good_maps/point_csv.xml | 6 +++--- tests/data/good_maps/point_json.xml | 6 +++--- tests/data/good_maps/point_json_inline.xml | 6 +++--- tests/data/good_maps/point_symbolizer.xml | 14 +++++++------- .../point_symbolizer_ignore_placements.xml | 4 ++-- .../good_maps/point_symbolizer_on_polygon_map.xml | 10 +++++----- tests/data/good_maps/text_rotation.xml | 14 +++++++------- tests/python_tests/object_test.py | 13 +++---------- 11 files changed, 45 insertions(+), 52 deletions(-) diff --git a/bindings/python/mapnik/printing.py b/bindings/python/mapnik/printing.py index 58f18b653..5e6456bd9 100644 --- a/bindings/python/mapnik/printing.py +++ b/bindings/python/mapnik/printing.py @@ -593,7 +593,7 @@ class PDFPrinter: for l in m.layers: # extract the layer names for naming layers if we use OCG - self._layer_names.append(l.title or l.name) + self._layer_names.append(l.name) layer_map = Map(m.width,m.height,m.srs) layer_map.layers.append(l) @@ -884,7 +884,7 @@ class PDFPrinter: for l in reversed(m.layers): have_layer_header = False added_styles={} - layer_title = l.title or l.name + layer_title = l.name if layer_title in processed_layers: continue processed_layers.append(layer_title) @@ -906,8 +906,8 @@ class PDFPrinter: if r.filter and str(r.filter) != "true": if len(rule_text) > 0: rule_text += " AND " - if r.title: - rule_text += r.title + if r.name: + rule_text += r.name else: rule_text += str(r.filter) active_rules = tuple(active_rules) diff --git a/tests/data/good_maps/markers_symbolizer_lines.xml b/tests/data/good_maps/markers_symbolizer_lines.xml index d3adaefb6..1336f56bc 100644 --- a/tests/data/good_maps/markers_symbolizer_lines.xml +++ b/tests/data/good_maps/markers_symbolizer_lines.xml @@ -1,7 +1,7 @@