#include #include #include #include #include namespace bg = boost::geometry; typedef bg::model::point point_t; typedef bg::model::multi_point multipoint_t; typedef bg::model::linestring linestring_t; typedef bg::model::multi_linestring multilinestring_t; int main() { // should fail /* multilinestring_t ml; bg::read_wkt("MULTILINESTRING ((10 10, 20 20, 10 40)," "(40 40, 30 30, 40 20, 30 10)),(0 0, 1 1)", ml); */ multipoint_t mp; bg::read_wkt("MULTIPOINT(0 1, 2 3)", mp); for (multipoint_t::const_iterator it = mp.begin(); it != mp.end(); ++it) { std::cout << it->get<0>() << ":" << it->get<1>() << std::endl; } bg::read_wkt("MULTIPOINT((4 5), (6 7))", mp); for (multipoint_t::const_iterator it = mp.begin(); it != mp.end(); ++it) { std::cout << it->get<0>() << ":" << it->get<1>() << std::endl; } // should fail /* bg::read_wkt("MULTIPOINT((8 9), 10 11)", mp); for (multipoint_t::const_iterator it = mp.begin(); it != mp.end(); ++it) { std::cout << it->get<0>() << ":" << it->get<1>() << std::endl; } */ // should fail /* bg::read_wkt("MULTIPOINT(12 13, (14 15))", mp); for (multipoint_t::const_iterator it = mp.begin(); it != mp.end(); ++it) { std::cout << it->get<0>() << ":" << it->get<1>() << std::endl; } */ // should fail /* bg::read_wkt("MULTIPOINT((16 17), (18 19)", mp); for (multipoint_t::const_iterator it = mp.begin(); it != mp.end(); ++it) { std::cout << it->get<0>() << ":" << it->get<1>() << std::endl; } */ // should fail /* bg::read_wkt("MULTIPOINT(16 17), (18 19)", mp); for (multipoint_t::const_iterator it = mp.begin(); it != mp.end(); ++it) { std::cout << it->get<0>() << ":" << it->get<1>() << std::endl; } */ return 0; }