python bindings - mapnik.LineStirng basic interface
This commit is contained in:
parent
e91389dcd5
commit
696be39119
1 changed files with 8 additions and 0 deletions
|
@ -272,6 +272,7 @@ void export_geometry()
|
|||
using namespace boost::python;
|
||||
|
||||
implicitly_convertible<mapnik::new_geometry::point, mapnik::new_geometry::geometry>();
|
||||
implicitly_convertible<mapnik::new_geometry::line_string, mapnik::new_geometry::geometry>();
|
||||
|
||||
enum_<mapnik::new_geometry::geometry_types>("GeometryType")
|
||||
.value("Point",mapnik::new_geometry::geometry_types::Point)
|
||||
|
@ -290,6 +291,7 @@ void export_geometry()
|
|||
|
||||
using mapnik::new_geometry::geometry;
|
||||
using mapnik::new_geometry::point;
|
||||
using mapnik::new_geometry::line_string;
|
||||
|
||||
class_<point>("Point", init<double, double>((arg("x"), arg("y")),
|
||||
"Constructs a new Point object\n"))
|
||||
|
@ -298,6 +300,12 @@ void export_geometry()
|
|||
.def("to_geojson",&to_geojson_impl)
|
||||
;
|
||||
|
||||
class_<line_string>("LineString", init<>(
|
||||
"Constructs a new LineString object\n"))
|
||||
.def("add_coord", &line_string::add_coord, "Adds coord")
|
||||
.def("to_geojson",&to_geojson_impl)
|
||||
;
|
||||
|
||||
class_<geometry, std::shared_ptr<geometry>, boost::noncopyable>("Geometry",no_init)
|
||||
.def("envelope",&geometry_envelope_impl)
|
||||
.def("from_geojson", from_geojson_impl)
|
||||
|
|
Loading…
Reference in a new issue