[Git][debian-gis-team/python-mapnik][master] 6 commits: New upstream version 0.0~20180411-fe47aa15e
Bas Couwenberg
gitlab at salsa.debian.org
Sat Apr 14 12:20:40 BST 2018
Bas Couwenberg pushed to branch master at Debian GIS Project / python-mapnik
Commits:
aaf44a8a by Bas Couwenberg at 2018-04-12T16:10:50+02:00
New upstream version 0.0~20180411-fe47aa15e
- - - - -
84460149 by Bas Couwenberg at 2018-04-12T16:10:52+02:00
Merge tag 'upstream/0.0_20180411-fe47aa15e'
Upstream version 0.0~20180411-fe47aa15e
- - - - -
5dbae19a by Bas Couwenberg at 2018-04-12T16:11:29+02:00
New upstream git snapshot.
- - - - -
38b88f35 by Bas Couwenberg at 2018-04-12T16:21:42+02:00
Bump Standards-Version to 4.1.4, no changes.
- - - - -
a523f873 by Bas Couwenberg at 2018-04-14T11:23:23+02:00
Rebuild with Mapnik 3.0.20.
- - - - -
4c54187a by Bas Couwenberg at 2018-04-14T13:01:08+02:00
Set distribution to unstable.
- - - - -
4 changed files:
- debian/changelog
- debian/control
- demo/python/rundemo.py
- src/mapnik_symbolizer.cpp
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
-python-mapnik (1:0.0~20180130-804a7947d-2) UNRELEASED; urgency=medium
+python-mapnik (1:0.0~20180411-fe47aa15e-1) unstable; urgency=medium
+ * New upstream git snapshot.
* Update Vcs-* URLs for Salsa.
+ * Bump Standards-Version to 4.1.4, no changes.
+ * Rebuild with Mapnik 3.0.20.
- -- Bas Couwenberg <sebastic at debian.org> Sat, 31 Mar 2018 12:55:39 +0200
+ -- Bas Couwenberg <sebastic at debian.org> Sat, 14 Apr 2018 13:00:56 +0200
python-mapnik (1:0.0~20180130-804a7947d-1) unstable; urgency=medium
=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Priority: optional
Build-Depends: debhelper (>= 9),
dh-python,
libboost-python-dev,
- libmapnik-dev (>= 3.0.19),
+ libmapnik-dev (>= 3.0.20),
python-all-dev,
python-setuptools,
python-cairo,
@@ -17,7 +17,7 @@ Build-Depends: debhelper (>= 9),
python3-cairo,
python3-cairo-dev,
python3-nose
-Standards-Version: 4.1.3
+Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/debian-gis-team/python-mapnik
Vcs-Git: https://salsa.debian.org/debian-gis-team/python-mapnik.git
Homepage: https://github.com/mapnik/python-mapnik
=====================================
demo/python/rundemo.py
=====================================
--- a/demo/python/rundemo.py
+++ b/demo/python/rundemo.py
@@ -164,7 +164,7 @@ sym = mapnik.LineSymbolizer()
# FIXME - currently adding dash arrays is broken
# https://github.com/mapnik/mapnik/issues/2324
sym.stroke = mapnik.Color('black')
-sym.stroke_width = 1.0
+sym.stroke_width = 1
provlines_rule.symbols.append(sym)
provlines_style.rules.append(provlines_rule)
@@ -196,7 +196,7 @@ roads34_rule.filter = mapnik.Expression('([CLASS] = 3) or ([CLASS] = 4)')
sym = mapnik.LineSymbolizer()
sym.stroke = mapnik.Color(171,158,137)
-sym.stroke_width = 2.0
+sym.stroke_width = 2
sym.stroke_linecap = mapnik.stroke_linecap.ROUND_CAP
roads34_rule.symbols.append(sym)
@@ -219,7 +219,7 @@ roads2_rule_1.filter = mapnik.Expression('[CLASS] = 2')
sym = mapnik.LineSymbolizer()
sym.stroke = mapnik.Color(171,158,137)
-sym.stroke_width = 4.0
+sym.stroke_width = 4
sym.stroke_linecap = mapnik.stroke_linecap.ROUND_CAP
roads2_rule_1.symbols.append(sym)
roads2_style_1.rules.append(roads2_rule_1)
@@ -232,7 +232,7 @@ roads2_rule_2.filter = mapnik.Expression('[CLASS] = 2')
sym = mapnik.LineSymbolizer()
sym.stroke = mapnik.Color(255,250,115)
sym.stroke_linecap = mapnik.stroke_linecap.ROUND_CAP
-sym.stroke_width = 2.0
+sym.stroke_width = 2
roads2_rule_2.symbols.append(sym)
roads2_style_2.rules.append(roads2_rule_2)
@@ -255,7 +255,7 @@ roads1_rule_1.filter = mapnik.Expression('[CLASS] = 1')
sym = mapnik.LineSymbolizer()
sym.stroke = mapnik.Color(188,149,28)
sym.stroke_linecap = mapnik.stroke_linecap.ROUND_CAP
-sym.stroke_width = 7.0
+sym.stroke_width = 7
roads1_rule_1.symbols.append(sym)
roads1_style_1.rules.append(roads1_rule_1)
m.append_style('highway-border', roads1_style_1)
@@ -265,7 +265,7 @@ roads1_rule_2 = mapnik.Rule()
roads1_rule_2.filter = mapnik.Expression('[CLASS] = 1')
sym.stroke = mapnik.Color(242,191,36)
sym.stroke_linecap = mapnik.stroke_linecap.ROUND_CAP
-sym.stroke_width = 5.0
+sym.stroke_width = 5
roads1_rule_2.symbols.append(sym)
roads1_style_2.rules.append(roads1_rule_2)
=====================================
src/mapnik_symbolizer.cpp
=====================================
--- a/src/mapnik_symbolizer.cpp
+++ b/src/mapnik_symbolizer.cpp
@@ -47,9 +47,6 @@
#include <mapnik/group/group_symbolizer_properties.hpp>
#include <mapnik/util/variant.hpp>
-// stl
-#include <sstream>
-
using mapnik::symbolizer;
using mapnik::point_symbolizer;
using mapnik::line_symbolizer;
@@ -73,10 +70,61 @@ using mapnik::parse_path;
namespace {
+
+struct value_to_target
+{
+ value_to_target(mapnik::symbolizer_base & sym, std::string const& name)
+ : sym_(sym), name_(name) {}
+
+ void operator() (mapnik::value_integer const& val)
+ {
+ auto key = mapnik::get_key(name_);
+ switch (std::get<2>(get_meta(key)))
+ {
+ case mapnik::property_types::target_bool:
+ put(sym_, key, static_cast<mapnik::value_bool>(val));
+ break;
+ case mapnik::property_types::target_double:
+ put(sym_, key, static_cast<mapnik::value_double>(val));
+ break;
+ default:
+ put(sym_, key, val);
+ break;
+ }
+ }
+
+ void operator() (mapnik::value_double const& val)
+ {
+ auto key = mapnik::get_key(name_);
+ switch (std::get<2>(get_meta(key)))
+ {
+ case mapnik::property_types::target_bool:
+ put(sym_, key, static_cast<mapnik::value_bool>(val));
+ break;
+ case mapnik::property_types::target_integer:
+ put(sym_, key, static_cast<mapnik::value_integer>(val));
+ break;
+ default:
+ put(sym_, key, val);
+ break;
+ }
+ }
+
+ template <typename T>
+ void operator() (T const& val)
+ {
+ put(sym_, mapnik::get_key(name_), val);
+ }
+private:
+ mapnik::symbolizer_base & sym_;
+ std::string const& name_;
+
+};
+
using namespace boost::python;
void __setitem__(mapnik::symbolizer_base & sym, std::string const& name, mapnik::symbolizer_base::value_type const& val)
{
- put(sym, mapnik::get_key(name), val);
+ mapnik::util::apply_visitor(value_to_target(sym, name), val);
}
std::shared_ptr<mapnik::symbolizer_base::value_type> numeric_wrapper(const object& arg)
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-mapnik/compare/f9698c8106c6a5027d180149c41d1f2e792bf4d8...4c54187adbb20f3a93b2b3d05b7553a9943a95fb
---
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-mapnik/compare/f9698c8106c6a5027d180149c41d1f2e792bf4d8...4c54187adbb20f3a93b2b3d05b7553a9943a95fb
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180414/a1d55303/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list