diff --git a/bindings/python/mapnik_feature.cpp b/bindings/python/mapnik_feature.cpp index b16ba4e67..11e3041fd 100644 --- a/bindings/python/mapnik_feature.cpp +++ b/bindings/python/mapnik_feature.cpp @@ -24,7 +24,7 @@ // boost #include -#include +//#include #include #include @@ -72,31 +72,10 @@ void __setitem__(Feature & feature, std::string const& name, mapnik::value const feature.put(name,val); } -feature_kv_iterator feature_kv_begin(Feature const& f) -{ - return feature_kv_iterator(f,true); -} - -feature_kv_iterator feature_kv_end(Feature const& f) -{ - return feature_kv_iterator(f); -} - } // end anonymous namespace namespace boost { namespace python { -struct mapnik_kv_to_python -{ - static PyObject* convert(feature_kv_iterator::value_type const& kv) - { - return boost::python::incref(boost::python::make_tuple(boost::get<0>(kv), boost::get<1>(kv)).ptr()); - } -}; - -// TODO mapnik.Context : implement vector_indexing_suite - we don't want to expose internal key->index mapping -// TODO mapnik.Feature : implement map_indexing_suite - }} struct UnicodeString_from_python_str @@ -165,12 +144,10 @@ void export_feature() implicitly_convertible(); UnicodeString_from_python_str(); - to_python_converter(); class_ ("Context",init<>("Default ctor.")) .def("push", &context::push) - //.def("__iter__",iterator()) ; class_, @@ -186,7 +163,7 @@ void export_feature() .def("envelope", &Feature::envelope) .def("has_key", &Feature::has_key) .def("__setitem__",&__setitem__) - .def("__getitem__",&__getitem__) + .def("__getitem__",&__getitem__) .def("__len__", &Feature::size) .def("context",&Feature::context) ;