Permalink
Browse files

Merge remote-tracking branch 'origin/master'

Conflicts:
	include/mapnik/geom_util.hpp
  • Loading branch information...
2 parents 5270f0b + ad90db2 commit 9fe15c9d3e58db431009dd2521398d6aed0cb69f @artemp artemp committed Jul 25, 2012
Showing with 798 additions and 541 deletions.
  1. +2 −0 bindings/python/mapnik_datasource.cpp
  2. +1 −0 bindings/python/mapnik_python.cpp
  3. +11 −43 bindings/python/mapnik_shield_symbolizer.cpp
  4. +2 −0 bindings/python/python_grid_utils.cpp
  5. +3 −0 demo/c++/rundemo.cpp
  6. +2 −0 include/mapnik/agg_renderer.hpp
  7. +1 −1 include/mapnik/cairo_renderer.hpp
  8. +3 −230 include/mapnik/css_color_grammar.hpp
  9. +14 −14 include/mapnik/geom_util.hpp
  10. +2 −2 include/mapnik/geometry.hpp
  11. +1 −1 include/mapnik/grid/grid.hpp
  12. +1 −1 include/mapnik/grid/grid_renderer.hpp
  13. +13 −5 include/mapnik/grid/grid_util.hpp
  14. +2 −38 include/mapnik/path_expression_grammar.hpp
  15. +1 −1 include/mapnik/rule.hpp
  16. +1 −1 include/mapnik/text_symbolizer.hpp
  17. +65 −171 include/mapnik/util/geometry_wkt_generator.hpp
  18. +10 −0 plugins/input/csv/csv_datasource.hpp
  19. +11 −1 plugins/input/gdal/gdal_datasource.hpp
  20. +1 −0 plugins/input/gdal/gdal_featureset.cpp
  21. +2 −0 plugins/input/gdal/gdal_featureset.hpp
  22. +1 −0 plugins/input/geojson/geojson_datasource.cpp
  23. +15 −0 plugins/input/geojson/geojson_datasource.hpp
  24. +9 −0 plugins/input/geos/geos_datasource.hpp
  25. +10 −6 plugins/input/kismet/kismet_datasource.hpp
  26. +1 −0 plugins/input/kismet/kismet_types.hpp
  27. +9 −1 plugins/input/occi/occi_datasource.hpp
  28. +1 −0 plugins/input/ogr/ogr_converter.hpp
  29. +9 −1 plugins/input/ogr/ogr_datasource.hpp
  30. +13 −0 plugins/input/osm/osm_datasource.hpp
  31. +10 −0 plugins/input/postgis/postgis_datasource.hpp
  32. +1 −0 plugins/input/raster/raster_datasource.cpp
  33. +15 −2 plugins/input/raster/raster_datasource.hpp
  34. +1 −0 plugins/input/raster/raster_featureset.cpp
  35. +11 −0 plugins/input/rasterlite/rasterlite_datasource.hpp
  36. +10 −0 plugins/input/shape/shape_datasource.hpp
  37. +1 −0 plugins/input/shape/shape_utils.cpp
  38. +1 −0 plugins/input/sqlite/sqlite_connection.hpp
  39. +9 −1 plugins/input/sqlite/sqlite_datasource.hpp
  40. +1 −0 plugins/input/sqlite/sqlite_prepared.hpp
  41. +1 −0 plugins/input/sqlite/sqlite_resultset.hpp
  42. +1 −0 plugins/input/sqlite/sqlite_utils.hpp
  43. +13 −0 plugins/input/templates/helloworld/hello_datasource.hpp
  44. +4 −2 src/agg/agg_renderer.cpp
  45. +7 −0 src/build.py
  46. +2 −1 src/cairo_renderer.cpp
  47. +262 −0 src/css_color_grammar.cpp
  48. +1 −0 src/deepcopy.cpp
  49. +0 −1 src/expression_node.cpp
  50. +5 −2 src/feature_style_processor.cpp
  51. +2 −0 src/grid/grid_renderer.cpp
  52. +1 −7 src/load_map.cpp
  53. +3 −1 src/map.cpp
  54. +8 −2 src/markers_symbolizer.cpp
  55. +2 −0 src/memory_datasource.cpp
  56. +62 −0 src/path_expression_grammar.cpp
  57. +6 −2 src/save_map.cpp
  58. +141 −0 src/wkb_generator.cpp
  59. +0 −3 utils/svg2png/svg2png.cpp
@@ -30,6 +30,8 @@
// mapnik
#include <mapnik/box2d.hpp>
+#include <mapnik/coord.hpp>
+#include <mapnik/query.hpp>
#include <mapnik/datasource.hpp>
#include <mapnik/datasource_cache.hpp>
#include <mapnik/feature_layer_desc.hpp>
@@ -72,6 +72,7 @@ void export_logger();
#include <mapnik/version.hpp>
#include <mapnik/value_error.hpp>
+#include <mapnik/layer.hpp>
#include <mapnik/map.hpp>
#include <mapnik/agg_renderer.hpp>
#ifdef HAVE_CAIRO
@@ -21,6 +21,13 @@
*
*****************************************************************************/
+/* The functions in this file produce deprecation warnings.
+ * But as shield symbolizer doesn't fully support more than one
+ * placement from python yet these functions are actually the
+ * correct ones.
+ */
+#define NO_DEPRECATION_WARNINGS
+
// boost
#include <boost/python.hpp>
@@ -53,12 +60,13 @@ tuple get_shield_displacement(const shield_symbolizer& s)
void set_shield_displacement(shield_symbolizer & s, boost::python::tuple arg)
{
- s.set_shield_displacement(extract<double>(arg[0]),extract<double>(arg[1]));
+ s.get_placement_options()->defaults.displacement.first = extract<double>(arg[0]);
+ s.get_placement_options()->defaults.displacement.second = extract<double>(arg[1]);
}
tuple get_text_displacement(const shield_symbolizer& t)
{
- position const& pos = t.get_displacement();
+ position const& pos = t.get_placement_options()->defaults.displacement;
return boost::python::make_tuple(pos.first, pos.second);
}
@@ -79,54 +87,14 @@ void set_filename(shield_symbolizer & t, std::string const& file_expr)
}
-struct shield_symbolizer_pickle_suite : boost::python::pickle_suite
-{
- static boost::python::tuple
- getinitargs(const shield_symbolizer& s)
- {
- std::string filename = path_processor_type::to_string(*s.get_filename());
- //(name, font name, font size, font color, image file, image type, width, height)
- return boost::python::make_tuple( "TODO",//s.get_name(),
- s.get_face_name(),s.get_text_size(),s.get_fill(),filename,guess_type(filename));
-
- }
-
- static boost::python::tuple
- getstate(const shield_symbolizer& s)
- {
- return boost::python::make_tuple(s.get_halo_fill(),s.get_halo_radius());
- }
-
- // TODO add lots more...
- static void
- setstate (shield_symbolizer& s, boost::python::tuple state)
- {
- using namespace boost::python;
- /*if (len(state) != 1)
- {
- PyErr_SetObject(PyExc_ValueError,
- ("expected 1-item tuple in call to __setstate__; got %s"
- % state).ptr()
- );
- throw_error_already_set();
- }*/
-
- s.set_halo_fill(extract<color>(state[0]));
- s.set_halo_radius(extract<float>(state[1]));
-
- }
-
-};
-
-
void export_shield_symbolizer()
{
using namespace boost::python;
class_< shield_symbolizer, bases<text_symbolizer> >("ShieldSymbolizer",
init<expression_ptr,
std::string const&,
unsigned, mapnik::color const&,
- path_expression_ptr>("TODO")
+ path_expression_ptr>()
)
//.def_pickle(shield_symbolizer_pickle_suite())
.add_property("allow_overlap",
@@ -26,6 +26,8 @@
#include <boost/foreach.hpp>
// mapnik
+#include <mapnik/map.hpp>
+#include <mapnik/layer.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/grid/grid_renderer.hpp>
#include <mapnik/grid/grid.hpp>
View
@@ -21,6 +21,9 @@
*****************************************************************************/
#include <mapnik/map.hpp>
+#include <mapnik/layer.hpp>
+#include <mapnik/rule.hpp>
+#include <mapnik/feature_type_style.hpp>
#include <mapnik/graphics.hpp>
#include <mapnik/datasource_cache.hpp>
#include <mapnik/font_engine_freetype.hpp>
@@ -29,6 +29,7 @@
#include <mapnik/font_engine_freetype.hpp>
#include <mapnik/label_collision_detector.hpp>
#include <mapnik/map.hpp>
+#include <mapnik/rule.hpp> // for all symbolizers
// boost
#include <boost/utility.hpp>
@@ -47,6 +48,7 @@ struct trans_affine;
namespace mapnik {
class marker;
+
struct rasterizer;
template <typename T>
@@ -31,7 +31,7 @@
#include <mapnik/font_engine_freetype.hpp>
#include <mapnik/label_collision_detector.hpp>
#include <mapnik/map.hpp>
-//#include <mapnik/marker.hpp>
+#include <mapnik/rule.hpp> // for all symbolizers
// cairo
#include <cairomm/context.h>
Oops, something went wrong.

0 comments on commit 9fe15c9

Please sign in to comment.