~ubuntu-branches/ubuntu/trusty/mapnik/trusty-proposed

« back to all changes in this revision

Viewing changes to bindings/python/mapnik_projection.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Sauthier
  • Date: 2009-08-27 00:28:37 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090827002837-ztqzfg2rmclfh4i9
Tags: 0.6.1-0ubuntu1
* New upstream release.
* Change usr/lib to usr/lib* to enable build on 64 bits systems due to new
  configuration in SConstruct in :
  - debian/libmapnik-dev.install
  - debian/libmapnik0.6.install
  - debian/mapnik-plugin-base

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <mapnik/coord.hpp>
26
26
#include <mapnik/projection.hpp>
27
27
 
 
28
using mapnik::projection;
 
29
 
 
30
struct projection_pickle_suite : boost::python::pickle_suite
 
31
{
 
32
    static boost::python::tuple
 
33
    getinitargs(const projection& p)
 
34
    {
 
35
        using namespace boost::python;
 
36
        return boost::python::make_tuple(p.params());
 
37
    }
 
38
};
 
39
 
28
40
namespace {
29
41
    mapnik::coord2d forward_pt(mapnik::coord2d const& pt, 
30
42
                            mapnik::projection const& prj)
73
85
void export_projection ()
74
86
{
75
87
    using namespace boost::python; 
76
 
    using mapnik::projection;
77
 
    
 
88
 
78
89
    class_<projection>("Projection", init<optional<std::string const&> >())
 
90
        .def_pickle(projection_pickle_suite())
79
91
        .def ("params", make_function(&projection::params,
80
92
                                      return_value_policy<copy_const_reference>()))
81
93
        .add_property ("geographic",&projection::is_geographic)