Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union of a multipolygon and a polygon outputs empty multipolygon #1277

Closed
z-masahiro-sakuta opened this issue May 1, 2024 · 4 comments
Closed

Comments

@z-masahiro-sakuta
Copy link

z-masahiro-sakuta commented May 1, 2024

Hi, I have a very weird problem regarding boost::geometry::union_.
I'm using:

  • x64
  • Ubuntu 20.04
  • libboost1.71-dev:amd64
  • gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

I'm trying to take a union of a multipolygon and a polygon. Let me call the multipolygon A and the polygon B.
Basically I want the output below.

namespace bg = boost::geometry;

typedef bg::model::point<double, 2, bg::cs::cartesian> point_type;
typedef bg::model::polygon<point_type>                 polygon_type;
typedef bg::model::multi_polygon<polygon_type>         multi_polygon_type;

multi_polygon_type A = get_A();
polygon_type B = get_B();
polygon_type output;
boost::geometry::union_(A, B, output);

It should output a multipolygon, which has an area equal to or larger than A or B.
However, it ends up with empty multipolygon.
Both A and B are valid, spike-free geometry.

This is A:

image

and this is B (not the same scale):

image

and this is the expected output (B is attached to the top right of A):

image

See my notebook in gist for the full plot: https://gist.github.com/z-masahiro-sakuta/c7700df23c3d70596a82a1af0377c33e

However, the very weird thing is, once I serialize A and B into WKT formatted texts and load them back, it won't happen. I guess some information is lost in serialization to the text.

For this reason, it is very hard to make a reproduceable code, because the problem happens in one part of my large codebase. I had to serialize the geometry in a raw binary format that preserves full double precision floating point data, otherwise I cannot put a reproduceable code here.

Reproduction code

I attached a zip file to reproduce it. It contains 4 files:

  • geom_invalid.cpp - the source file to build the reproduction code. It contains custom deserialization code to load from A.bin and B.bin.
  • CMakeLists.txt - to build the application
  • A.bin - a binary serialized multipolygon for A
  • B.bin - a binary serialized polygon for B

geom_invalid.zip

You can unzip and run like this:

mkdir build && cd build && cmake .. && make && ./geom_invalid 

The output in my environment is below.
The 5th line says result wkt = "MULTIPOLYGON()" but it should contain a union of the polygons.
The last 2 lines show the correct result if the inputs are converted to WKT.

input A area: 747712
input A is_valid: 1
input B area: 57353.4
input B is_valid: 1
result wkt = "MULTIPOLYGON()"
result area: 0
a_via_wkt = "MULTIPOLYGON(((13440 32406,13441.8 32405.7,13423.4 32373.5,13414 32357,13370.5 32194.4,13370.5 32194.4,13357 32144,13235.3 31745,13235.3 31745,13180.9 31566.3,13180.9 31566.3,13164 31511,13138.2 31405.4,13138.2 31405.4,13113 31302,13016 30942,12973 30708,12968.9 30687.7,12968.9 30687.7,12931 30500,12903.2 30336.2,12883.1 30218.2,12869 30135,12848.3 29989.8,12844 29960,12825.2 29857.9,12825.2 29857.9,12806 29754,12773 29559,12753.8 29451.2,12745.4 29403.8,12745.4 29403.8,12726 29295,12731 29277,12739 29266,12741 29256,12762.2 29228.2,12773 29214,12786 29216,12855.5 29207.4,12874.1 29205.1,12900 29202,12900 29200,12900 29117.1,12912.3 29087.4,12908 29087,12816 29040,12765 29003,12748 28893,12735.8 28798.2,12719 28667,12705 28597,12690 28514,12675.3 28426.4,12648 28264,12633 28215,12633 28175,12637 28160,12650 28150,12661 28152,12796 28131,12796 28127,12769.2 28080.6,12769.2 28027.5,12741.9 28031.5,12741.9 28031.5,12643 28046,12624 28047,12424 28074,12196 28110,12187 28113,11714 28178,11414 28222,11064 28275,10983 28290,10962 28280,10761 28311,10724.1 28188.2,10655.6 28216.6,10654.3 28217.9,10652.6 28218.6,10652.3 28218.9,10650.6 28219.6,10649.3 28220.9,10647.6 28221.6,10647.3 28221.9,10645.6 28222.6,10645.3 28222.9,10643.6 28223.6,10642.3 28224.9,10640.6 28225.6,10640.3 28225.9,10638.6 28226.6,10638.3 28226.9,10636.6 28227.6,10635.3 28228.9,10633.6 28229.6,10633.3 28229.9,10631.6 28230.6,10631.3 28230.9,10629.6 28231.6,10627.6 28233.6,10575.8 28426.8,10717.2 28568.2,10771 28553.8,10771 28573,10772 28573,10815.5 28555,10818 28555,10820.4 28554,10823 28554,10825.4 28553,10829 28553,10831.4 28552,10835 28552,10836 28551.6,10796 28411,10892 28392,11759 28264,12399 28171.7,12494 28158,12525 28163,12547 28176,12577 28184,12608 28271,12615.7 28315.7,12615.7 28315.7,12663 28592,12629 28599,12505 28600,12521 28686,12675 28663,12689 28745,12700.8 28841.9,12700.8 28841.9,12705.6 28881.8,12706 28885,12708.8 28926.8,12710 28944,12706 28986,12700 29004,12680.1 29026.8,12652.9 29057.8,12627.6 29086.8,12616 29100,12617.8 29236.8,12618 29252,12612 29266,12611.8 29273.2,12611 29311,12618 29344,12626.2 29403.2,12626.4 29404.2,12627.8 29414.8,12630.5 29434.1,12632.9 29451.2,12639 29495,12657.9 29597.1,12657.9 29597.1,12679 29711,12709.6 29888.8,12709.6 29888.8,12725 29978,12726.9 29989.8,12726.9 29989.8,12743.4 30091.8,12782 30329.8,12786.8 30359.8,12786.8 30359.8,12804 30466,12823 30587,12855 30769,12906 31039,12965.8 31246,12999.4 31362,13021 31436.8,13021 31436.8,13054 31551,13101 31721,13157.2 31906,13193 32024,13244 32212,13248.4 32227.2,13248.3 32227.2,13308 32435,13440 32406),(12682 29336,12685 29338,12687 29350,12686 29353,12675 29354,12671 29352,12668 29340,12670 29337,12682 29336),(12827 30211,12821 30214,12815 30210,12816 30204,12819 30201,12826 30202,12827 30211),(12815 30112,12805 30112,12802 30111,12801 30102,12804 30095,12815 30095,12822 30099,12823 30108,12815 30112),(12867 30454,12870 30456,12875 30474,12874 30476,12858 30480,12852 30478,12848 30461,12849 30459,12867 30454),(13098 31450,13106 31455,13107 31459,13105 31465,13091 31470,13085 31466,13084 31461,13086 31455,13098 31450),(13156 31649,13142 31653,13138 31652,13135 31641,13138 31635,13149 31634,13152 31636,13156 31649),(13321 32292,13318 32290,13316 32282,13317 32278,13332 32274,13335 32289,13321 32292)))"
b_via_wkt = "POLYGON((13383.7 32243.8,13273 32243.8,13259.7 32266.8,13308 32435,13297 32438,13315 32488,13371.9 32652.2,13473 32652.2,13500.1 32605.3,13461 32434,13453 32404,13441.8 32405.7,13414 32357,13383.7 32243.8),(13335 32289,13321 32292,13318 32290,13316 32282,13317 32278,13332 32274,13335 32289),(13441.8 32405.7,13442 32406,13440 32406,13441.8 32405.7))"
result_via_wkt = "MULTIPOLYGON(((13308 32435,13297 32438,13315 32488,13371.9 32652.2,13473 32652.2,13500.1 32605.3,13461 32434,13453 32404,13441.8 32405.7,13414 32357,13370.5 32194.4,13357 32144,13235.3 31745,13180.9 31566.3,13164 31511,13138.2 31405.4,13113 31302,13016 30942,12973 30708,12968.9 30687.7,12931 30500,12903.2 30336.2,12883.1 30218.2,12869 30135,12848.3 29989.8,12844 29960,12825.2 29857.9,12806 29754,12773 29559,12753.8 29451.2,12745.4 29403.8,12726 29295,12731 29277,12739 29266,12741 29256,12762.2 29228.2,12773 29214,12786 29216,12855.5 29207.4,12874.1 29205.1,12900 29202,12900 29200,12900 29117.1,12912.3 29087.4,12908 29087,12816 29040,12765 29003,12748 28893,12735.8 28798.2,12719 28667,12705 28597,12690 28514,12675.3 28426.4,12648 28264,12633 28215,12633 28175,12637 28160,12650 28150,12661 28152,12796 28131,12796 28127,12769.2 28080.6,12769.2 28027.5,12741.9 28031.5,12643 28046,12624 28047,12424 28074,12196 28110,12187 28113,11714 28178,11414 28222,11064 28275,10983 28290,10962 28280,10761 28311,10724.1 28188.2,10655.6 28216.6,10654.3 28217.9,10652.6 28218.6,10652.3 28218.9,10650.6 28219.6,10649.3 28220.9,10647.6 28221.6,10647.3 28221.9,10645.6 28222.6,10645.3 28222.9,10643.6 28223.6,10642.3 28224.9,10640.6 28225.6,10640.3 28225.9,10638.6 28226.6,10638.3 28226.9,10636.6 28227.6,10635.3 28228.9,10633.6 28229.6,10633.3 28229.9,10631.6 28230.6,10631.3 28230.9,10629.6 28231.6,10627.6 28233.6,10575.8 28426.8,10717.2 28568.2,10771 28553.8,10771 28573,10772 28573,10815.5 28555,10818 28555,10820.4 28554,10823 28554,10825.4 28553,10829 28553,10831.4 28552,10835 28552,10836 28551.6,10796 28411,10892 28392,11759 28264,12399 28171.7,12494 28158,12525 28163,12547 28176,12577 28184,12608 28271,12615.7 28315.7,12663 28592,12629 28599,12505 28600,12521 28686,12675 28663,12689 28745,12700.8 28841.9,12705.6 28881.8,12706 28885,12708.8 28926.8,12710 28944,12706 28986,12700 29004,12680.1 29026.8,12652.9 29057.8,12627.6 29086.8,12616 29100,12617.8 29236.8,12618 29252,12612 29266,12611.8 29273.2,12611 29311,12618 29344,12626.2 29403.2,12626.4 29404.2,12627.8 29414.8,12630.5 29434.1,12632.9 29451.2,12639 29495,12657.9 29597.1,12679 29711,12709.6 29888.8,12725 29978,12726.9 29989.8,12743.4 30091.8,12782 30329.8,12786.8 30359.8,12804 30466,12823 30587,12855 30769,12906 31039,12965.8 31246,12999.4 31362,13021 31436.8,13054 31551,13101 31721,13157.2 31906,13193 32024,13244 32212,13248.4 32227.2,13248.3 32227.2,13308 32435),(12682 29336,12685 29338,12687 29350,12686 29353,12675 29354,12671 29352,12668 29340,12670 29337,12682 29336),(12827 30211,12821 30214,12815 30210,12816 30204,12819 30201,12826 30202,12827 30211),(12815 30112,12805 30112,12802 30111,12801 30102,12804 30095,12815 30095,12822 30099,12823 30108,12815 30112),(12867 30454,12870 30456,12875 30474,12874 30476,12858 30480,12852 30478,12848 30461,12849 30459,12867 30454),(13098 31450,13106 31455,13107 31459,13105 31465,13091 31470,13085 31466,13084 31461,13086 31455,13098 31450),(13156 31649,13142 31653,13138 31652,13135 31641,13138 31635,13149 31634,13152 31636,13156 31649),(13321 32292,13318 32290,13316 32282,13317 32278,13332 32274,13335 32289,13321 32292),(13440 32406,13441.8 32405.7,13442 32406,13440 32406)))"
result_via_wkt area: 782211

Workarounds

I could use WKT in the input shapes to fix it, but I don't know why it works, and unless I find the root cause, it may not fix other cases.

Also, I run the logic in a performance-critical code, so I don't want to convert back and force between WKT unnecessarily.

I also tried boost::geometry::correct() and boost::geometry::remove_spikes() on the input, but neither worked.

I use boost::geometry::union_ a lot in my application, and this issue happens very rarely (maybe once in thousands of times). Most of the time, the union produces expected multipolygon. But once it happens, it persists with the same inputs and my users can't fix it.

@vissarion
Copy link
Member

Thanks for opening the issue. I can reproduce it with boost 1.71 but with current version (1.85) the problem seems to be fixed. I am getting the following output (also testing for validity of output)

input A area: 747712
input A is_valid: 1
input B area: 57353.4
input B is_valid: 1
result wkt = "MULTIPOLYGON(((13308 32435,13297 32438,13315 32488,13371.9 32652.2,13473 32652.2,13500.1 32605.3,13461 32434,13453 32404,13441.8 32405.7,13441.8 32405.7,13414 32357,13370.5 32194.4,13370.5 32194.4,13357 32144,13235.3 31745,13235.3 31745,13180.9 31566.3,13180.9 31566.3,13164 31511,13138.2 31405.4,13138.2 31405.4,13113 31302,13016 30942,12973 30708,12968.9 30687.7,12968.9 30687.7,12931 30500,12903.2 30336.2,12883.1 30218.2,12869 30135,12848.3 29989.8,12844 29960,12825.2 29857.9,12825.2 29857.9,12806 29754,12773 29559,12753.8 29451.2,12745.4 29403.8,12745.4 29403.8,12726 29295,12731 29277,12739 29266,12741 29256,12762.2 29228.2,12773 29214,12786 29216,12855.5 29207.4,12874.1 29205.1,12900 29202,12900 29200,12900 29117.1,12912.3 29087.4,12908 29087,12816 29040,12765 29003,12748 28893,12735.8 28798.2,12719 28667,12705 28597,12690 28514,12675.3 28426.4,12648 28264,12633 28215,12633 28175,12637 28160,12650 28150,12661 28152,12796 28131,12796 28127,12769.2 28080.6,12769.2 28027.5,12741.9 28031.5,12741.9 28031.5,12643 28046,12624 28047,12424 28074,12196 28110,12187 28113,11714 28178,11414 28222,11064 28275,10983 28290,10962 28280,10761 28311,10724.1 28188.2,10655.6 28216.6,10654.3 28217.9,10652.6 28218.6,10652.3 28218.9,10650.6 28219.6,10649.3 28220.9,10647.6 28221.6,10647.3 28221.9,10645.6 28222.6,10645.3 28222.9,10643.6 28223.6,10642.3 28224.9,10640.6 28225.6,10640.3 28225.9,10638.6 28226.6,10638.3 28226.9,10636.6 28227.6,10635.3 28228.9,10633.6 28229.6,10633.3 28229.9,10631.6 28230.6,10631.3 28230.9,10629.6 28231.6,10627.6 28233.6,10575.8 28426.8,10717.2 28568.2,10771 28553.8,10771 28573,10772 28573,10815.5 28555,10818 28555,10820.4 28554,10823 28554,10825.4 28553,10829 28553,10831.4 28552,10835 28552,10836 28551.6,10796 28411,10892 28392,11759 28264,12399 28171.7,12494 28158,12525 28163,12547 28176,12577 28184,12608 28271,12615.7 28315.7,12615.7 28315.7,12663 28592,12629 28599,12505 28600,12521 28686,12675 28663,12689 28745,12700.8 28841.9,12700.8 28841.9,12705.6 28881.8,12706 28885,12708.8 28926.8,12710 28944,12706 28986,12700 29004,12680.1 29026.8,12652.9 29057.8,12627.6 29086.8,12616 29100,12617.8 29236.8,12618 29252,12612 29266,12611.8 29273.2,12611 29311,12618 29344,12626.2 29403.2,12626.4 29404.2,12627.8 29414.8,12630.5 29434.1,12632.9 29451.2,12639 29495,12657.9 29597.1,12657.9 29597.1,12679 29711,12709.6 29888.8,12709.6 29888.8,12725 29978,12726.9 29989.8,12726.9 29989.8,12743.4 30091.8,12782 30329.8,12786.8 30359.8,12786.8 30359.8,12804 30466,12823 30587,12855 30769,12906 31039,12965.8 31246,12999.4 31362,13021 31436.8,13021 31436.8,13054 31551,13101 31721,13157.2 31906,13193 32024,13244 32212,13248.4 32227.2,13248.3 32227.2,13308 32435),(12682 29336,12685 29338,12687 29350,12686 29353,12675 29354,12671 29352,12668 29340,12670 29337,12682 29336),(12827 30211,12821 30214,12815 30210,12816 30204,12819 30201,12826 30202,12827 30211),(12815 30112,12805 30112,12802 30111,12801 30102,12804 30095,12815 30095,12822 30099,12823 30108,12815 30112),(12867 30454,12870 30456,12875 30474,12874 30476,12858 30480,12852 30478,12848 30461,12849 30459,12867 30454),(13098 31450,13106 31455,13107 31459,13105 31465,13091 31470,13085 31466,13084 31461,13086 31455,13098 31450),(13156 31649,13142 31653,13138 31652,13135 31641,13138 31635,13149 31634,13152 31636,13156 31649),(13321 32292,13318 32290,13316 32282,13317 32278,13332 32274,13335 32289,13321 32292),(13440 32406,13441.8 32405.7,13442 32406,13440 32406)))"
result area: 782217
result is_valid: 1
a_via_wkt = "MULTIPOLYGON(((13440 32406,13441.8 32405.7,13423.4 32373.5,13414 32357,13370.5 32194.4,13370.5 32194.4,13357 32144,13235.3 31745,13235.3 31745,13180.9 31566.3,13180.9 31566.3,13164 31511,13138.2 31405.4,13138.2 31405.4,13113 31302,13016 30942,12973 30708,12968.9 30687.7,12968.9 30687.7,12931 30500,12903.2 30336.2,12883.1 30218.2,12869 30135,12848.3 29989.8,12844 29960,12825.2 29857.9,12825.2 29857.9,12806 29754,12773 29559,12753.8 29451.2,12745.4 29403.8,12745.4 29403.8,12726 29295,12731 29277,12739 29266,12741 29256,12762.2 29228.2,12773 29214,12786 29216,12855.5 29207.4,12874.1 29205.1,12900 29202,12900 29200,12900 29117.1,12912.3 29087.4,12908 29087,12816 29040,12765 29003,12748 28893,12735.8 28798.2,12719 28667,12705 28597,12690 28514,12675.3 28426.4,12648 28264,12633 28215,12633 28175,12637 28160,12650 28150,12661 28152,12796 28131,12796 28127,12769.2 28080.6,12769.2 28027.5,12741.9 28031.5,12741.9 28031.5,12643 28046,12624 28047,12424 28074,12196 28110,12187 28113,11714 28178,11414 28222,11064 28275,10983 28290,10962 28280,10761 28311,10724.1 28188.2,10655.6 28216.6,10654.3 28217.9,10652.6 28218.6,10652.3 28218.9,10650.6 28219.6,10649.3 28220.9,10647.6 28221.6,10647.3 28221.9,10645.6 28222.6,10645.3 28222.9,10643.6 28223.6,10642.3 28224.9,10640.6 28225.6,10640.3 28225.9,10638.6 28226.6,10638.3 28226.9,10636.6 28227.6,10635.3 28228.9,10633.6 28229.6,10633.3 28229.9,10631.6 28230.6,10631.3 28230.9,10629.6 28231.6,10627.6 28233.6,10575.8 28426.8,10717.2 28568.2,10771 28553.8,10771 28573,10772 28573,10815.5 28555,10818 28555,10820.4 28554,10823 28554,10825.4 28553,10829 28553,10831.4 28552,10835 28552,10836 28551.6,10796 28411,10892 28392,11759 28264,12399 28171.7,12494 28158,12525 28163,12547 28176,12577 28184,12608 28271,12615.7 28315.7,12615.7 28315.7,12663 28592,12629 28599,12505 28600,12521 28686,12675 28663,12689 28745,12700.8 28841.9,12700.8 28841.9,12705.6 28881.8,12706 28885,12708.8 28926.8,12710 28944,12706 28986,12700 29004,12680.1 29026.8,12652.9 29057.8,12627.6 29086.8,12616 29100,12617.8 29236.8,12618 29252,12612 29266,12611.8 29273.2,12611 29311,12618 29344,12626.2 29403.2,12626.4 29404.2,12627.8 29414.8,12630.5 29434.1,12632.9 29451.2,12639 29495,12657.9 29597.1,12657.9 29597.1,12679 29711,12709.6 29888.8,12709.6 29888.8,12725 29978,12726.9 29989.8,12726.9 29989.8,12743.4 30091.8,12782 30329.8,12786.8 30359.8,12786.8 30359.8,12804 30466,12823 30587,12855 30769,12906 31039,12965.8 31246,12999.4 31362,13021 31436.8,13021 31436.8,13054 31551,13101 31721,13157.2 31906,13193 32024,13244 32212,13248.4 32227.2,13248.3 32227.2,13308 32435,13440 32406),(12682 29336,12685 29338,12687 29350,12686 29353,12675 29354,12671 29352,12668 29340,12670 29337,12682 29336),(12827 30211,12821 30214,12815 30210,12816 30204,12819 30201,12826 30202,12827 30211),(12815 30112,12805 30112,12802 30111,12801 30102,12804 30095,12815 30095,12822 30099,12823 30108,12815 30112),(12867 30454,12870 30456,12875 30474,12874 30476,12858 30480,12852 30478,12848 30461,12849 30459,12867 30454),(13098 31450,13106 31455,13107 31459,13105 31465,13091 31470,13085 31466,13084 31461,13086 31455,13098 31450),(13156 31649,13142 31653,13138 31652,13135 31641,13138 31635,13149 31634,13152 31636,13156 31649),(13321 32292,13318 32290,13316 32282,13317 32278,13332 32274,13335 32289,13321 32292)))"
b_via_wkt = "POLYGON((13383.7 32243.8,13273 32243.8,13259.7 32266.8,13308 32435,13297 32438,13315 32488,13371.9 32652.2,13473 32652.2,13500.1 32605.3,13461 32434,13453 32404,13441.8 32405.7,13414 32357,13383.7 32243.8),(13335 32289,13321 32292,13318 32290,13316 32282,13317 32278,13332 32274,13335 32289),(13441.8 32405.7,13442 32406,13440 32406,13441.8 32405.7))"
result_via_wkt = "MULTIPOLYGON(((13308 32435,13297 32438,13315 32488,13371.9 32652.2,13473 32652.2,13500.1 32605.3,13461 32434,13453 32404,13441.8 32405.7,13414 32357,13370.5 32194.4,13357 32144,13235.3 31745,13180.9 31566.3,13164 31511,13138.2 31405.4,13113 31302,13016 30942,12973 30708,12968.9 30687.7,12931 30500,12903.2 30336.2,12883.1 30218.2,12869 30135,12848.3 29989.8,12844 29960,12825.2 29857.9,12806 29754,12773 29559,12753.8 29451.2,12745.4 29403.8,12726 29295,12731 29277,12739 29266,12741 29256,12762.2 29228.2,12773 29214,12786 29216,12855.5 29207.4,12874.1 29205.1,12900 29202,12900 29200,12900 29117.1,12912.3 29087.4,12908 29087,12816 29040,12765 29003,12748 28893,12735.8 28798.2,12719 28667,12705 28597,12690 28514,12675.3 28426.4,12648 28264,12633 28215,12633 28175,12637 28160,12650 28150,12661 28152,12796 28131,12796 28127,12769.2 28080.6,12769.2 28027.5,12741.9 28031.5,12643 28046,12624 28047,12424 28074,12196 28110,12187 28113,11714 28178,11414 28222,11064 28275,10983 28290,10962 28280,10761 28311,10724.1 28188.2,10655.6 28216.6,10654.3 28217.9,10652.6 28218.6,10652.3 28218.9,10650.6 28219.6,10649.3 28220.9,10647.6 28221.6,10647.3 28221.9,10645.6 28222.6,10645.3 28222.9,10643.6 28223.6,10642.3 28224.9,10640.6 28225.6,10640.3 28225.9,10638.6 28226.6,10638.3 28226.9,10636.6 28227.6,10635.3 28228.9,10633.6 28229.6,10633.3 28229.9,10631.6 28230.6,10631.3 28230.9,10629.6 28231.6,10627.6 28233.6,10575.8 28426.8,10717.2 28568.2,10771 28553.8,10771 28573,10772 28573,10815.5 28555,10818 28555,10820.4 28554,10823 28554,10825.4 28553,10829 28553,10831.4 28552,10835 28552,10836 28551.6,10796 28411,10892 28392,11759 28264,12399 28171.7,12494 28158,12525 28163,12547 28176,12577 28184,12608 28271,12615.7 28315.7,12663 28592,12629 28599,12505 28600,12521 28686,12675 28663,12689 28745,12700.8 28841.9,12705.6 28881.8,12706 28885,12708.8 28926.8,12710 28944,12706 28986,12700 29004,12680.1 29026.8,12652.9 29057.8,12627.6 29086.8,12616 29100,12617.8 29236.8,12618 29252,12612 29266,12611.8 29273.2,12611 29311,12618 29344,12626.2 29403.2,12626.4 29404.2,12627.8 29414.8,12630.5 29434.1,12632.9 29451.2,12639 29495,12657.9 29597.1,12679 29711,12709.6 29888.8,12725 29978,12726.9 29989.8,12743.4 30091.8,12782 30329.8,12786.8 30359.8,12804 30466,12823 30587,12855 30769,12906 31039,12965.8 31246,12999.4 31362,13021 31436.8,13054 31551,13101 31721,13157.2 31906,13193 32024,13244 32212,13248.4 32227.2,13248.3 32227.2,13308 32435),(12682 29336,12685 29338,12687 29350,12686 29353,12675 29354,12671 29352,12668 29340,12670 29337,12682 29336),(12827 30211,12821 30214,12815 30210,12816 30204,12819 30201,12826 30202,12827 30211),(12815 30112,12805 30112,12802 30111,12801 30102,12804 30095,12815 30095,12822 30099,12823 30108,12815 30112),(12867 30454,12870 30456,12875 30474,12874 30476,12858 30480,12852 30478,12848 30461,12849 30459,12867 30454),(13098 31450,13106 31455,13107 31459,13105 31465,13091 31470,13085 31466,13084 31461,13086 31455,13098 31450),(13156 31649,13142 31653,13138 31652,13135 31641,13138 31635,13149 31634,13152 31636,13156 31649),(13321 32292,13318 32290,13316 32282,13317 32278,13332 32274,13335 32289,13321 32292),(13440 32406,13441.8 32405.7,13442 32406,13440 32406)))"
result_via_wkt area: 782211
result_via_wkt is_valid: 1

The two results are slightly different probably due to information lost in serialization to the text.

@z-masahiro-sakuta
Copy link
Author

Thanks for the reply! I will try with a newer version of boost.

@vissarion
Copy link
Member

Thanks for the reply! I will try with a newer version of boost.

Thanks. If the newer version resolves your problem please close this issue.

@z-masahiro-sakuta
Copy link
Author

Yes, I confirmed it works with 1.85. I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants