summarylogtreecommitdiffstats
path: root/proj6-apis.patch
blob: b645e692a8c3b231332cd110e80d41c4e4f81f63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Description: Upgrade to use new APIs
Author: Artem Pavlenko <artem@mapnik.org>
Origin: https://github.com/mapnik/python-mapnik/commit/feec9afa66131b074c40359529e498eab0d79a02
Forwarded: not-needed

--- a/src/mapnik_proj_transform.cpp
+++ b/src/mapnik_proj_transform.cpp
@@ -48,7 +48,7 @@ struct proj_transform_pickle_suite : boo
     getinitargs(const proj_transform& p)
     {
         using namespace boost::python;
-        return boost::python::make_tuple(p.source(),p.dest());
+        return boost::python::make_tuple(p.definition());
     }
 };
 
@@ -62,7 +62,7 @@ mapnik::coord2d forward_transform_c(mapn
     if (!t.forward(x,y,z)) {
         std::ostringstream s;
         s << "Failed to forward project "
-          << "from " << t.source().params() << " to: " << t.dest().params();
+          << t.definition();
         throw std::runtime_error(s.str());
     }
     return mapnik::coord2d(x,y);
@@ -76,7 +76,7 @@ mapnik::coord2d backward_transform_c(map
     if (!t.backward(x,y,z)) {
         std::ostringstream s;
         s << "Failed to back project "
-          << "from " <<  t.dest().params() << " to: " << t.source().params();
+         << t.definition();
         throw std::runtime_error(s.str());
     }
     return mapnik::coord2d(x,y);
@@ -88,7 +88,7 @@ mapnik::box2d<double> forward_transform_
     if (!t.forward(new_box)) {
         std::ostringstream s;
         s << "Failed to forward project "
-          << "from " << t.source().params() << " to: " << t.dest().params();
+          << t.definition();
         throw std::runtime_error(s.str());
     }
     return new_box;
@@ -100,7 +100,7 @@ mapnik::box2d<double> backward_transform
     if (!t.backward(new_box)){
         std::ostringstream s;
         s << "Failed to back project "
-          << "from " <<  t.dest().params() << " to: " << t.source().params();
+          << t.definition();
         throw std::runtime_error(s.str());
     }
     return new_box;
@@ -112,7 +112,7 @@ mapnik::box2d<double> forward_transform_
     if (!t.forward(new_box,points)) {
         std::ostringstream s;
         s << "Failed to forward project "
-          << "from " << t.source().params() << " to: " << t.dest().params();
+          << t.definition();
         throw std::runtime_error(s.str());
     }
     return new_box;
@@ -124,7 +124,7 @@ mapnik::box2d<double> backward_transform
     if (!t.backward(new_box,points)){
         std::ostringstream s;
         s << "Failed to back project "
-          << "from " <<  t.dest().params() << " to: " << t.source().params();
+          <<  t.definition();
         throw std::runtime_error(s.str());
     }
     return new_box;
@@ -136,7 +136,7 @@ void export_proj_transform ()
 {
     using namespace boost::python;
 
-    class_<proj_transform, boost::noncopyable>("ProjTransform", init< projection const&, projection const& >())
+    class_<proj_transform, boost::noncopyable>("ProjTransform", init<projection const&, projection const&>())
         .def_pickle(proj_transform_pickle_suite())
         .def("forward", forward_transform_c)
         .def("backward",backward_transform_c)
@@ -144,6 +144,7 @@ void export_proj_transform ()
         .def("backward",backward_transform_env)
         .def("forward", forward_transform_env_p)
         .def("backward",backward_transform_env_p)
+        .def("definition",&proj_transform::definition)
         ;
 
 }