Boost logo

Boost :

Subject: [boost] [Geometry] Wrong results for dissolve Polygon
From: Andreas Wimmer (andreas.wimmer_at_[hidden])
Date: 2015-06-12 02:49:25


Dear Boost Geometry Contributors,
 
I am testing the boost::geometry::dissolve function upon some invalid
polygons that are produced by a certain in-house segmentation alg.
The fact that the algorithm is producing possibly invalid polygons cannot be
changed easily so I thought I will fix them afterwards using dissolve from
“geometry/extensions/algorithms/dissolve.hpp” for the latest boost 1.58 version.
Unfortunately I stumbled over the following polygons for which dissolve
produces wrong results.
 
The following code illustrates the result
 
using namespace boost::geometry;
using namespace boost::geometry::model;
using namespace boost::geometry::model::d2;
 
int
main(int argc, _TCHAR* argv[])
{
    polygon< point_xy<float> > Poly;
    read_wkt("1e=8  ÄÀ€ÄÀ°€ÄÀ€ÈÀ°€ÈÀ€ÈÀ°€ÄÔ€ÄÈ°€ÄÔ€Äà°€ÈÀ€ÄÀ°€ÄÀ€ÄÀ¤¤ˆ°(€€€€€€€€€€€€€€€€A½±ä¤ì(€(€€€µÕ±Ñ¥}Á½±å½¸ðÁ½±å½¸ðÁ½¥¹Ñ}áäð™±½…Ѐø€ø€ø¥Íͽ±Ù•ì(€€€‰½½ÍÐè靕½µ•ÑÉäèé‘¥Íͽ±Ù”¡A½±ä°¥Íͽ±Ù•¤ì)ô(€)]¡¥ É•ÍÕ±Ñ́¥¸„Á½±å½¸¥¹±Õ‘¥¹œÑ¡”Íµ…±°¥¹Ñ•ÉÍ•Ñ¥½¸Á…ÉЁݡ¥ )Í¡½Õ±‰”•á±Õ‘•™É½´Ñ¡”Á½±å½¸()¹•Ù•¸µ½É”Áɽ‰±•µ…Ñ¥ŒÑ¡”™½±±½Ý¥¹œ•á…µÁ±”€¡Í…µ”Á½±å½¸Ý¥Ñ …¹)…‘‘¥Ñ¥½¹…°Í•±˜µÑ½Õ¡¥¹œ½Õѕȁɥ¹œ¤É•ÍÕ±Ñ́¥¸µ¥ÍÍ¥¹œÑ¡”•¹Ñ¥É”µ…¥¸Á…ÉÐ)½˜Ñ¡”Á½±å½¸(€)¥¹Ð€)µ…¥¸¡¥¹Ð…ɝŒ°}Q !H¨…ɝÙmt¤€)ì€(€€€Á½±å½¸ðÁ½¥¹Ñ}áäñ™±½…Ðø€øA½±äì(€€€É•…‘}ݭР‰A=1e=8  ÄÀ€ÄÀ°€ÄÀ€ÈÀ°€ÈÀ€ÈÀ°€ÈÀ€ÈÔ°€ÈÈ€ÈÔ°€ÈÀ€ÈÀ°€ÄÔ€ÄÈ°€ÄÔ(Äà°€ÈÀ€ÄÀ°€ÄÀ€ÄÀ¤¤ˆ°(€€€€€€€€€€€€A½±ä¤ì(€(€€€µÕ±Ñ¥}Á½±å½¸ðÁ½±å½¸ðÁ½¥¹Ñ}áäð™±½…Ѐø€ø€ø¥Íͽ±Ù•ì(€€€‰½½ÍÐè靕½µ•ÑÉäèé‘¥Íͽ±Ù”¡A½±ä°¥öÇfVB“°§Ð¢


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk