CGAL 6.0 - 2D Polygon Repair
Loading...
Searching...
No Matches
Polygon_repair/repair_multipolygon_2.cpp
#include <iostream>
#include <fstream>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polygon_repair/repair.h>
#include <CGAL/IO/WKT.h>
using Polygon_2 = CGAL::Polygon_2<Kernel>;
using Multipolygon_with_holes_2 = CGAL::Multipolygon_with_holes_2<Kernel>;
int main(int argc, char* argv[])
{
std::ifstream in((argc > 1) ? argv[1] : CGAL::data_file_path("wkt/issue.wkt"));
Multipolygon_with_holes_2 pin;
Multipolygon_with_holes_2 mp = CGAL::Polygon_repair::repair(pin);
return 0;
}
Multipolygon_with_holes_2< Kernel, Container > repair(const Polygon_2< Kernel, Container > &p, Rule=Rule())
repairs polygon p using the given rule
Definition: repair.h:46
std::ostream & write_multi_polygon_WKT(std::ostream &out, MultiPolygon &polygons)
bool read_multi_polygon_WKT(std::istream &in, MultiPolygon &polygons)