Skip to content

Commit

Permalink
Add test case reported in #573
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstace committed Nov 22, 2023
1 parent f24faa8 commit dc30e62
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions geom/alg_set_op_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,13 @@ func TestBinaryOp(t *testing.T) {
input2: "LINESTRING(0.1 0.1,0.5 0.5)",
inter: "POINT(0.5 0.5)",
},

// Reported in https://github.com/peterstace/simplefeatures/issues/573
{
input1: "MULTIPOLYGON(((144.14852129205005 -36.60216120134051,144.1498935327475 -36.88032819802394,144.15040812300904 -36.887324318786426,144.1526380141424 -36.887324318786426,144.15280954422957 -36.88801017847503,144.15503943536294 -36.88787300703022,144.15538249553728 -36.88938187936745,144.15778391675784 -36.88910754116068,144.1582985070194 -36.89102788790482,144.16138604858864 -36.89089072188227,144.16121451850145 -36.89418263839662,144.16344440963482 -36.894319798503766,144.16361593972198 -36.895279912352436,144.16653195120406 -36.89541707048774,144.2114728340455 -36.89637717053346,144.2114728340455 -36.895142753970624,144.2126735446558 -36.89500559534236,144.2126735446558 -36.89637717053346,144.2152464959635 -36.89651432669692,144.31902219870804 -36.89884594376332,144.32193821019013 -36.89884594376332,144.32210974027728 -36.89829733439166,144.32228127036447 -36.89884594376332,144.32519728184656 -36.89898309549001,144.50976365565342 -36.90309753267125,144.53223409707417 -36.87429181406224,144.53309174751004 -36.87223384684748,144.53309174751004 -36.86962700878087,144.53480704838185 -36.86948980431315,144.53497857846904 -36.87045023041224,144.53566469881775 -36.86990141697698,144.59655787976703 -36.79165520168818,144.58455077366435 -36.61193608998413,144.5713429569514 -36.61166075796511,144.57117142686425 -36.61262441573086,144.57031377642832 -36.612762080142936,144.56756929503345 -36.61234908616945,144.5670547047719 -36.61152309158697,144.55213158718715 -36.61124775809338,144.55196005709996 -36.61179842409749,144.54904404561788 -36.61166075796511,144.54870098544353 -36.61207375562499,144.54750027483325 -36.61179842409749,144.54767180492044 -36.61111009097795,144.54578497396145 -36.61097242361676,144.52863196524333 -36.61097242361676,144.51542414853037 -36.61028408312449,144.50667611408414 -36.61055942005868,144.5063330539098 -36.61138542496305,144.50358857251487 -36.61124775809338,144.50307398225334 -36.61179842409749,144.5018732716431 -36.61152309158697,144.5018732716431 -36.61083475600983,144.4963843088533 -36.60987107588005,144.39432390698053 -36.60753065971684,144.39243707602154 -36.60753065971684,144.39243707602154 -36.608632040875996,144.39140789549847 -36.60876971241501,144.39140789549847 -36.60794367949463,144.38763423358048 -36.60753065971684,144.3864335229702 -36.60849436909124,144.38626199288302 -36.607806006481134,144.3821452707907 -36.60725531196955,144.35795952849816 -36.60670461352599,144.35298515596992 -36.60711763772727,144.35281362588273 -36.60876971241501,144.35041220466218 -36.608632040875996,144.350240674575 -36.609320396113546,144.34938302413912 -36.60904505475579,144.34955455422627 -36.60725531196955,144.34372253126213 -36.60642926282975,144.30958804391307 -36.605603204843085,144.3068435625182 -36.605603204843085,144.306672032431 -36.60629158711301,144.3058143819951 -36.60629158711301,144.30564285190792 -36.605603204843085,144.2987816484207 -36.60546552765187,144.2986101183335 -36.60670461352599,144.2975809378104 -36.606842288505504,144.29740940772322 -36.60532785021491,144.2648186911588 -36.60463945934398,144.26464716107165 -36.605603204843085,144.26361798054856 -36.60574088178856,144.263103390287 -36.60463945934398,144.24286283999965 -36.604088742223894,144.2416621293894 -36.604088742223894,144.2414905993022 -36.60505249460376,144.23908917808166 -36.60491481642958,144.23874611790728 -36.60725531196955,144.2378884674714 -36.60697996323927,144.23840305773294 -36.604088742223894,144.23685928694832 -36.603951062329536,144.1768237564349 -36.602711932221936,144.1768237564349 -36.604501780432564,144.17630916617338 -36.60463945934398,144.17545151573748 -36.60367570180357,144.17270703434258 -36.603400340294655,144.17270703434258 -36.60257424987018,144.15332413449113 -36.60216120134051,144.15315260440394 -36.603813382189415,144.15229495396804 -36.603951062329536,144.1500650628347 -36.60367570180357,144.15040812300904 -36.60216120134051,144.14852129205005 -36.60216120134051),(144.1498935327475 -36.603951062329536,144.1500650628347 -36.60670461352599,144.1492074123988 -36.60711763772727,144.1490358823116 -36.60697996323927,144.1498935327475 -36.603951062329536)))",
input2: "MULTIPOLYGON(((144.14852129205005 -36.60216120134051,144.1498935327475 -36.88032819802394,144.15040812300904 -36.887324318786426,144.1526380141424 -36.887324318786426,144.15280954422957 -36.88801017847503,144.15503943536294 -36.88787300703022,144.15538249553728 -36.88938187936745,144.15778391675784 -36.88910754116068,144.1582985070194 -36.89102788790482,144.16138604858864 -36.89089072188227,144.16121451850145 -36.89418263839662,144.16344440963482 -36.894319798503766,144.16361593972198 -36.895279912352436,144.16653195120406 -36.89541707048774,144.2114728340455 -36.89637717053346,144.2114728340455 -36.895142753970624,144.2126735446558 -36.89500559534236,144.2126735446558 -36.89637717053346,144.2152464959635 -36.89651432669692,144.31902219870804 -36.89884594376332,144.32193821019013 -36.89884594376332,144.32210974027728 -36.89829733439166,144.32228127036447 -36.89884594376332,144.32519728184656 -36.89898309549001,144.50976365565342 -36.90309753267125,144.53223409707417 -36.87429181406224,144.53309174751004 -36.87223384684748,144.53309174751004 -36.86962700878087,144.53480704838185 -36.86948980431315,144.53497857846904 -36.87045023041224,144.53566469881775 -36.86990141697698,144.59655787976703 -36.79165520168818,144.58455077366435 -36.61193608998413,144.5713429569514 -36.61166075796511,144.57117142686425 -36.61262441573086,144.57031377642832 -36.612762080142936,144.56756929503345 -36.61234908616945,144.5670547047719 -36.61152309158697,144.55213158718715 -36.61124775809338,144.55196005709996 -36.61179842409749,144.54904404561788 -36.61166075796511,144.54870098544353 -36.61207375562499,144.54750027483325 -36.61179842409749,144.54767180492044 -36.61111009097795,144.54578497396145 -36.61097242361676,144.52863196524333 -36.61097242361676,144.51542414853037 -36.61028408312449,144.50667611408414 -36.61055942005868,144.5063330539098 -36.61138542496305,144.50358857251487 -36.61124775809338,144.50307398225334 -36.61179842409749,144.5018732716431 -36.61152309158697,144.5018732716431 -36.61083475600983,144.4963843088533 -36.60987107588005,144.39432390698053 -36.60753065971684,144.39243707602154 -36.60753065971684,144.39243707602154 -36.608632040875996,144.39140789549847 -36.60876971241501,144.39140789549847 -36.60794367949463,144.38763423358048 -36.60753065971684,144.3864335229702 -36.60849436909124,144.38626199288302 -36.607806006481134,144.3821452707907 -36.60725531196955,144.35795952849816 -36.60670461352599,144.35298515596992 -36.60711763772727,144.35281362588273 -36.60876971241501,144.35041220466218 -36.608632040875996,144.350240674575 -36.609320396113546,144.34938302413912 -36.60904505475579,144.34955455422627 -36.60725531196955,144.34372253126213 -36.60642926282975,144.30958804391307 -36.605603204843085,144.3068435625182 -36.605603204843085,144.306672032431 -36.60629158711301,144.3058143819951 -36.60629158711301,144.30564285190792 -36.605603204843085,144.2987816484207 -36.60546552765187,144.2986101183335 -36.60670461352599,144.2975809378104 -36.606842288505504,144.29740940772322 -36.60532785021491,144.2648186911588 -36.60463945934398,144.26464716107165 -36.605603204843085,144.26361798054856 -36.60574088178856,144.263103390287 -36.60463945934398,144.24286283999965 -36.604088742223894,144.2416621293894 -36.604088742223894,144.2414905993022 -36.60505249460376,144.23908917808166 -36.60491481642958,144.23874611790728 -36.60725531196955,144.2378884674714 -36.60697996323927,144.23840305773294 -36.604088742223894,144.23685928694832 -36.603951062329536,144.1768237564349 -36.602711932221936,144.1768237564349 -36.604501780432564,144.17630916617338 -36.60463945934398,144.17545151573748 -36.60367570180357,144.17270703434258 -36.603400340294655,144.17270703434258 -36.60257424987018,144.15332413449113 -36.60216120134051,144.15315260440394 -36.603813382189415,144.15229495396804 -36.603951062329536,144.1500650628347 -36.60367570180357,144.15040812300904 -36.60216120134051,144.14852129205005 -36.60216120134051),(144.1498935327475 -36.603951062329536,144.1500650628347 -36.60670461352599,144.1492074123988 -36.60711763772727,144.1490358823116 -36.60697996323927,144.1498935327475 -36.603951062329536)))",
union: "POLYGON((144.14852129205005 -36.60216120134051,144.1498935327475 -36.88032819802394,144.15040812300904 -36.887324318786426,144.1526380141424 -36.887324318786426,144.15280954422957 -36.88801017847503,144.15503943536294 -36.88787300703022,144.15538249553728 -36.88938187936745,144.15778391675784 -36.88910754116068,144.1582985070194 -36.89102788790482,144.16138604858864 -36.89089072188227,144.16121451850145 -36.89418263839662,144.16344440963482 -36.894319798503766,144.16361593972198 -36.895279912352436,144.16653195120406 -36.89541707048774,144.2114728340455 -36.89637717053346,144.2114728340455 -36.895142753970624,144.2126735446558 -36.89500559534236,144.2126735446558 -36.89637717053346,144.2152464959635 -36.89651432669692,144.31902219870804 -36.89884594376332,144.32193821019013 -36.89884594376332,144.32210974027728 -36.89829733439166,144.32228127036447 -36.89884594376332,144.32519728184656 -36.89898309549001,144.50976365565342 -36.90309753267125,144.53223409707417 -36.87429181406224,144.53309174751004 -36.87223384684748,144.53309174751004 -36.86962700878087,144.53480704838185 -36.86948980431315,144.53497857846904 -36.87045023041224,144.53566469881775 -36.86990141697698,144.59655787976703 -36.79165520168818,144.58455077366435 -36.61193608998413,144.5713429569514 -36.61166075796511,144.57117142686425 -36.61262441573086,144.57031377642832 -36.612762080142936,144.56756929503345 -36.61234908616945,144.5670547047719 -36.61152309158697,144.55213158718715 -36.61124775809338,144.55196005709996 -36.61179842409749,144.54904404561788 -36.61166075796511,144.54870098544353 -36.61207375562499,144.54750027483325 -36.61179842409749,144.54767180492044 -36.61111009097795,144.54578497396145 -36.61097242361676,144.52863196524333 -36.61097242361676,144.51542414853037 -36.61028408312449,144.50667611408414 -36.61055942005868,144.5063330539098 -36.61138542496305,144.50358857251487 -36.61124775809338,144.50307398225334 -36.61179842409749,144.5018732716431 -36.61152309158697,144.5018732716431 -36.61083475600983,144.4963843088533 -36.60987107588005,144.39432390698053 -36.60753065971684,144.39243707602154 -36.60753065971684,144.39243707602154 -36.608632040875996,144.39140789549847 -36.60876971241501,144.39140789549847 -36.60794367949463,144.38763423358048 -36.60753065971684,144.3864335229702 -36.60849436909124,144.38626199288302 -36.607806006481134,144.3821452707907 -36.60725531196955,144.35795952849816 -36.60670461352599,144.35298515596992 -36.60711763772727,144.35281362588273 -36.60876971241501,144.35041220466218 -36.608632040875996,144.350240674575 -36.609320396113546,144.34938302413912 -36.60904505475579,144.34955455422627 -36.60725531196955,144.34372253126213 -36.60642926282975,144.30958804391307 -36.605603204843085,144.3068435625182 -36.605603204843085,144.306672032431 -36.60629158711301,144.3058143819951 -36.60629158711301,144.30564285190792 -36.605603204843085,144.2987816484207 -36.60546552765187,144.2986101183335 -36.60670461352599,144.2975809378104 -36.606842288505504,144.29740940772322 -36.60532785021491,144.2648186911588 -36.60463945934398,144.26464716107165 -36.605603204843085,144.26361798054856 -36.60574088178856,144.263103390287 -36.60463945934398,144.24286283999965 -36.604088742223894,144.2416621293894 -36.604088742223894,144.2414905993022 -36.60505249460376,144.23908917808166 -36.60491481642958,144.23874611790728 -36.60725531196955,144.2378884674714 -36.60697996323927,144.23840305773294 -36.604088742223894,144.23685928694832 -36.603951062329536,144.1768237564349 -36.602711932221936,144.1768237564349 -36.604501780432564,144.17630916617338 -36.60463945934398,144.17545151573748 -36.60367570180357,144.17270703434258 -36.603400340294655,144.17270703434258 -36.60257424987018,144.15332413449113 -36.60216120134051,144.15315260440394 -36.603813382189415,144.15229495396804 -36.603951062329536,144.1500650628347 -36.60367570180357,144.15040812300904 -36.60216120134051,144.14852129205005 -36.60216120134051),(144.1498935327475 -36.603951062329536,144.1500650628347 -36.60670461352599,144.1492074123988 -36.60711763772727,144.1490358823116 -36.60697996323927,144.1498935327475 -36.603951062329536))",
},
} {
t.Run(strconv.Itoa(i), func(t *testing.T) {
g1 := geomFromWKT(t, geomCase.input1)
Expand Down

0 comments on commit dc30e62

Please sign in to comment.