This commit is contained in:
Artem Pavlenko 2010-04-09 18:45:45 +00:00
parent 0cd1a5fbc6
commit f6852e2401

View file

@ -211,15 +211,8 @@ struct std_pair_to_python_converter
std_pair_to_tuple<T1, T2> >(); std_pair_to_tuple<T1, T2> >();
} }
}; };
}
}
/* }}
mapnik::feature_ptr create_feature_(int id)
{
return mapnik::feature_ptr(new mapnik::Feature(id));
}
*/
struct UnicodeString_from_python_str struct UnicodeString_from_python_str
{ {
@ -279,24 +272,12 @@ void export_feature()
boost::noncopyable>("Feature",init<int>("Default ctor.")) boost::noncopyable>("Feature",init<int>("Default ctor."))
.def("id",&Feature::id) .def("id",&Feature::id)
.def("__str__",&Feature::to_string) .def("__str__",&Feature::to_string)
// .add_property("properties", .def("add_geometry", &feature_add_wkb_geometry)
// make_function(&Feature::props,return_value_policy<reference_existing_object>()))
.def("add_geometry", &feature_add_wkb_geometry)
.def("num_geometries",&Feature::num_geometries) .def("num_geometries",&Feature::num_geometries)
.def("get_geometry", make_function(get_geom1,return_value_policy<reference_existing_object>())) .def("get_geometry", make_function(get_geom1,return_value_policy<reference_existing_object>()))
.def("envelope", &Feature::envelope) .def("envelope", &Feature::envelope)
//.def("create",create_feature_)
//.staticmethod("create")
.def(map_indexing_suite2<Feature, true >()) .def(map_indexing_suite2<Feature, true >())
.def("iteritems",iterator<Feature> ()) .def("iteritems",iterator<Feature> ())
// TODO define more mapnik::Feature methods
// TODO define more mapnik::Feature methods
; ;
//def("Feature", &create_feature_);
//class_<std::map<std::string, mapnik::value> >("Properties")
// .def(map_indexing_suite2<std::map<std::string, mapnik::value>, true >())
// .def("iteritems",iterator<std::map<std::string,mapnik::value> > ())
// ;
} }