Show
Ignore:
Timestamp:
01/12/09 19:56:09 (19 months ago)
Author:
artem
Message:

+ applied python_point_datasource.patch from lwu

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/bindings/python/mapnik_query.cpp

    r313 r790  
    2424#include <boost/python.hpp> 
    2525#include <mapnik/query.hpp> 
     26#include <mapnik/envelope.hpp> 
    2627 
    2728void export_query() 
    2829{ 
     30    using namespace boost::python; 
     31 
    2932    using mapnik::query; 
    30     //class_<query>("Query",init< 
     33    using mapnik::Envelope; 
     34 
     35    class_<query>("Query", "a spatial query data object",  
     36                  init<Envelope<double>,double>() ) 
     37        .add_property("resolution", &query::resolution) 
     38        .add_property("bbox", make_function(&query::get_bbox, 
     39                                            return_value_policy<copy_const_reference>()) ) 
     40        .add_property("property_names", make_function(&query::property_names, 
     41                                                      return_value_policy<copy_const_reference>()) ) 
     42        .def("add_property_name", &query::add_property_name); 
    3143} 
    3244