diff --git a/include/mapnik/datasource.hpp b/include/mapnik/datasource.hpp index 92974c998..6ff92ae73 100644 --- a/include/mapnik/datasource.hpp +++ b/include/mapnik/datasource.hpp @@ -40,8 +40,6 @@ namespace mapnik { -typedef MAPNIK_DECL boost::shared_ptr feature_ptr; - struct MAPNIK_DECL Featureset : private mapnik::noncopyable { virtual feature_ptr next() = 0; diff --git a/include/mapnik/feature.hpp b/include/mapnik/feature.hpp index daa732be0..2782562e2 100644 --- a/include/mapnik/feature.hpp +++ b/include/mapnik/feature.hpp @@ -313,6 +313,8 @@ inline std::ostream& operator<< (std::ostream & out,feature_impl const& f) typedef feature_impl Feature; +typedef MAPNIK_DECL boost::shared_ptr feature_ptr; + } #endif // MAPNIK_FEATURE_HPP diff --git a/include/mapnik/json/feature_collection_parser.hpp b/include/mapnik/json/feature_collection_parser.hpp index 5238f37a0..454d69a98 100644 --- a/include/mapnik/json/feature_collection_parser.hpp +++ b/include/mapnik/json/feature_collection_parser.hpp @@ -26,8 +26,8 @@ // mapnik #include #include -#include #include +#include // boost #include @@ -43,7 +43,7 @@ template class feature_collection_parser : private mapnik::noncopyable { typedef Iterator iterator_type; - typedef mapnik::Feature feature_type; + typedef mapnik::feature_impl feature_type; public: feature_collection_parser(mapnik::context_ptr const& ctx, mapnik::transcoder const& tr); ~feature_collection_parser(); diff --git a/include/mapnik/json/feature_generator_grammar.hpp b/include/mapnik/json/feature_generator_grammar.hpp index 7968d3716..d5d16c47d 100644 --- a/include/mapnik/json/feature_generator_grammar.hpp +++ b/include/mapnik/json/feature_generator_grammar.hpp @@ -25,6 +25,7 @@ // mapnik #include +#include #include #include #include @@ -43,29 +44,29 @@ namespace boost { namespace spirit { namespace traits { template <> -struct is_container : mpl::false_ {} ; +struct is_container : mpl::false_ {} ; template <> -struct container_iterator +struct container_iterator { typedef mapnik::feature_kv_iterator2 type; }; template <> -struct begin_container +struct begin_container { static mapnik::feature_kv_iterator2 - call (mapnik::Feature const& f) + call (mapnik::feature_impl const& f) { return mapnik::feature_kv_iterator2(mapnik::value_not_null(),f.begin(),f.end()); } }; template <> -struct end_container +struct end_container { static mapnik::feature_kv_iterator2 - call (mapnik::Feature const& f) + call (mapnik::feature_impl const& f) { return mapnik::feature_kv_iterator2(mapnik::value_not_null(),f.end(),f.end()); } @@ -94,7 +95,7 @@ struct get_id template struct result { typedef int type; }; - int operator() (mapnik::Feature const& f) const + int operator() (mapnik::feature_impl const& f) const { return f.id(); } @@ -107,7 +108,7 @@ struct make_properties_range template struct result { typedef properties_range_type type; }; - properties_range_type operator() (mapnik::Feature const& f) const + properties_range_type operator() (mapnik::feature_impl const& f) const { return boost::make_iterator_range(f.begin(),f.end()); } @@ -173,7 +174,7 @@ struct escaped_string template struct feature_generator_grammar: - karma::grammar + karma::grammar { typedef boost::tuple pair_type; typedef make_properties_range::properties_range_type range_type; @@ -224,10 +225,10 @@ struct feature_generator_grammar: } // rules - karma::rule feature; + karma::rule feature; multi_geometry_generator_grammar geometry; escaped_string escaped_string_; - karma::rule properties; + karma::rule properties; karma::rule pair; karma::rule value; karma::rule value_null_; diff --git a/include/mapnik/json/feature_grammar.hpp b/include/mapnik/json/feature_grammar.hpp index 3acf72704..fbffaed07 100644 --- a/include/mapnik/json/feature_grammar.hpp +++ b/include/mapnik/json/feature_grammar.hpp @@ -25,6 +25,7 @@ // mapnik #include +#include #include #include #include diff --git a/include/mapnik/json/geojson_generator.hpp b/include/mapnik/json/geojson_generator.hpp index 36c587c3b..acc644eb1 100644 --- a/include/mapnik/json/geojson_generator.hpp +++ b/include/mapnik/json/geojson_generator.hpp @@ -43,7 +43,7 @@ class MAPNIK_DECL feature_generator : private mapnik::noncopyable public: feature_generator(); ~feature_generator(); - bool generate(std::string & geojson, mapnik::Feature const& f); + bool generate(std::string & geojson, mapnik::feature_impl const& f); private: boost::scoped_ptr > grammar_; }; @@ -66,7 +66,7 @@ class MAPNIK_DECL feature_generator : private mapnik::noncopyable public: feature_generator() {} ~feature_generator() {} - bool generate(std::string & geojson, mapnik::Feature const& f); + bool generate(std::string & geojson, mapnik::feature_impl const& f); }; class MAPNIK_DECL geometry_generator : private mapnik::noncopyable diff --git a/include/mapnik/marker_helpers.hpp b/include/mapnik/marker_helpers.hpp index 7d9861528..607908c07 100644 --- a/include/mapnik/marker_helpers.hpp +++ b/include/mapnik/marker_helpers.hpp @@ -24,6 +24,7 @@ #define MAPNIK_MARKER_HELPERS_HPP #include +#include #include #include #include @@ -303,17 +304,17 @@ void build_ellipse(T const& sym, mapnik::feature_impl const& feature, svg_storag double height = 0; if (width_expr && height_expr) { - width = boost::apply_visitor(evaluate(feature), *width_expr).to_double(); - height = boost::apply_visitor(evaluate(feature), *height_expr).to_double(); + width = boost::apply_visitor(evaluate(feature), *width_expr).to_double(); + height = boost::apply_visitor(evaluate(feature), *height_expr).to_double(); } else if (width_expr) { - width = boost::apply_visitor(evaluate(feature), *width_expr).to_double(); + width = boost::apply_visitor(evaluate(feature), *width_expr).to_double(); height = width; } else if (height_expr) { - height = boost::apply_visitor(evaluate(feature), *height_expr).to_double(); + height = boost::apply_visitor(evaluate(feature), *height_expr).to_double(); width = height; } svg::svg_converter_type styled_svg(svg_path, marker_ellipse.attributes()); @@ -386,11 +387,11 @@ void setup_transform_scaling(agg::trans_affine & tr, box2d const& bbox, expression_ptr const& width_expr = sym.get_width(); if (width_expr) - width = boost::apply_visitor(evaluate(feature), *width_expr).to_double(); + width = boost::apply_visitor(evaluate(feature), *width_expr).to_double(); expression_ptr const& height_expr = sym.get_height(); if (height_expr) - height = boost::apply_visitor(evaluate(feature), *height_expr).to_double(); + height = boost::apply_visitor(evaluate(feature), *height_expr).to_double(); if (width > 0 && height > 0) {