Opened 7 years ago

Closed 12 months ago

#810 closed defect (fixed)

Single Sided Buffering gives undesireable output

Reported by: MShepherd Owned by: strk
Priority: major Milestone: 3.6.6
Component: Core Version: 3.6.0
Severity: Unassigned Keywords:
Cc:

Description

This is possibly related to ticket#712.

Attempting to buffer a single side of a wavy line leads to chaotic output.

The attached image shows an attempted single side buffer of a coastline. The dark line shows the input, the blue area shows the attempted single sided buffering. A buffer size of 250000 was used.

Here is a the input: LINESTRING (-330000 7775580.27545528,-327124.603026804 7778363.07840546,-322646.558837081 7781868.88753221,-317433.043647011 7784688.27737948,-316303.203385341 7790968.44230594,-317442.143469762 7795751.14794915,-316863.906652886 7801677.2774448,-315913.30569277 7802924.06835483,-314537.40123425 7803861.47730282,-311744.141466252 7805672.38689663,-305851.078428029 7808929.40643811,-304225.017687078 7808227.43646823,-302182.883033831 7808050.1092118,-300837.489539075 7808309.99629711,-295964.386303115 7810615.19402131,-286917.531503575 7811709.67581166,-285784.240498585 7811630.91435707,-284509.123658347 7811158.98217569,-283285.545378713 7810662.45967257,-284406.256925248 7812239.92102531,-285338.757717091 7813074.21932283,-286580.725016533 7813793.3454897,-290562.738135843 7815738.14620312,-293108.523929261 7816001.89287396,-295866.893866139 7816780.72342721,-301699.247051365 7820331.71605258,-302692.71218015 7822575.94037292,-302307.038402448 7826957.45471089,-301514.47383015 7826678.10870587,-300723.359235454 7826094.98575103,-298923.364046851 7826394.66608802,-297586.418655574 7827008.29539278,-295525.566065385 7831517.48222906,-296359.824737537 7831846.80074167,-297230.741805492 7831615.815457,-298385.517235201 7830861.41057343,-300021.788771363 7829824.10596317,-301595.607265749 7830328.41682047,-304772.393211759 7831261.9697123,-306235.51816879 7833195.12484279,-305375.480278636 7837523.18967152,-304528.844013489 7840132.50457198,-303203.989857806 7844085.65160915,-302057.646776574 7846811.26012157,-296130.596253034 7853514.8912128,-295094.072764169 7852736.57659716,-292907.572738442 7850039.4435051,-290709.492152659 7847312.80075625,-285746.205755603 7840514.77816052,-280482.536308121 7833098.9635929,-277687.048453202 7829067.58653221,-272855.352341989 7820918.41328104,-272049.364283447 7819478.11404964,-270006.970268784 7814988.15790903,-268422.439296417 7810395.5062151,-267127.723668011 7805653.52122293,-266559.384135021 7803527.29837703,-266161.199654391 7800203.43344842,-262385.7113251 7783568.83316334,-260732.710429029 7771810.49130956,-259337.413896531 7761786.88588274,-258438.519346415 7756313.54858863,-257589.617699132 7753964.80948164,-255745.223426597 7750847.43222585,-255109.300469097 7749935.2713097,-250436.454772419 7741761.99538837,-244890.520991135 7731578.43369323,-244067.965065079 7728556.2122026,-238961.168664753 7720971.36709126,-238117.961601881 7720108.14071886,-236708.867743098 7718877.54355698,-236232.9723868 7718486.34885048,-234577.665219253 7716173.53455417,-233658.660710549 7715039.56590262,-231786.625659364 7713098.2216202,-230845.682143247 7712290.29781583,-229190.543466666 7711010.55068472,-218415.94435506 7704179.1421655,-213544.85626115 7700986.05016981,-211248.659460235 7703756.11219821,-211980.736797001 7707538.91723703,-211023.34533723 7710117.06389676,-204599.482650457 7707972.00399129,-202849.353939175 7707792.52550575,-201410.893966132 7708956.31826258,-200440.335895467 7711417.63992685,-199245.919402071 7715113.04001928,-200205.222756464 7717028.52202765,-213801.826923119 7716681.0821576,-216621.9928861 7715004.72774961,-220149.026434954 7713693.82773971,-218107.727027823 7719220.20761733,-214018.648960727 7723021.75978533,-212994.379712333 7723318.86375307,-207256.738456372 7721426.90372085,-200564.69055389 7719537.42107484,-202457.031516579 7721822.53775115,-203603.6830388 7722573.17351463,-205198.123642321 7724047.54506798,-210012.815338184 7736887.35329259,-207609.713659951 7742664.48918206,-195868.581748432 7747695.46951301,-194992.135121821 7747608.12477142,-193436.009692121 7747067.01496242,-192194.274665979 7745899.99466843,-191174.65683265 7740047.62405241,-191068.991852394 7736277.20912907,-190266.159690681 7737237.47875582,-189160.893979236 7739014.1971642,-186591.422131367 7744019.56874312,-187807.575827446 7746213.88659277,-188839.194209644 7747805.71151419,-193553.661219894 7748328.25309177,-201961.349915637 7750061.85924604,-202658.070192692 7752855.83803161,-203098.157377153 7755598.04703112,-200834.728244343 7758923.89492514,-199686.053238401 7760180.05002752,-198396.312377972 7760087.34169595,-198390.322132114 7756614.94271672,-198880.043724802 7754166.40772904,-194777.385494895 7753435.86667339,-193636.127749891 7755800.15697602,-192502.34754999 7758877.92059913,-189370.977897518 7766259.9567503,-187201.531066824 7769054.66892442,-182013.209959018 7772064.40333259,-182854.887558681 7776390.46106273,-184028.701599322 7776888.13847125,-186316.938081218 7777007.65993206,-190302.164864217 7776678.63369297,-191708.860770666 7775887.16868382,-192607.750020295 7775064.52065522,-194309.863207631 7772803.73333907,-195517.580065094 7770363.8650097,-199257.703737691 7769603.58878602,-198222.844005642 7776957.62889123,-190673.841757512 7784560.4716956,-189807.651537892 7784833.43614977,-189352.977334319 7782812.43993755,-190193.559037167 7780253.54487236,-191896.866738487 7778240.24148889,-186782.14820104 7778102.57360821,-185246.481635433 7778880.43956173,-188470.275530628 7779078.1193913,-187810.712889105 7780750.95482826,-183109.250591528 7782317.30817978,-179258.385043554 7782855.94655488,-177747.837656213 7783050.15577872,-176441.415149734 7782452.27751116,-175252.67390462 7776673.71482106,-173956.353564391 7776063.85363155,-169602.635912049 7778627.64992877,-168320.654437849 7780603.31358294,-168971.289053694 7783092.12396072,-171357.306805702 7785939.8984775,-172633.791863748 7786921.20891225,-174246.399750149 7787570.93492025,-175609.546986597 7786616.37592807,-177786.687909991 7785572.20550801,-179610.598122256 7785246.23511266,-179965.450923973 7789081.84238672,-177887.32277251 7791471.26557315,-168026.656848856 7791180.51604948,-166471.392416561 7789172.59083448,-165753.664484196 7781787.14728496,-166641.002829922 7777452.50016812,-168821.099424978 7772839.40521534,-170497.673055615 7769574.54754815,-170228.914048743 7757588.83550258,-171190.250326002 7755064.7781908,-172522.637001416 7752627.97351334,-173524.518178844 7750557.40663451,-173832.043741621 7743796.8270717,-172487.746907743 7742245.17458428,-168788.53114104 7740890.13698307,-166268.664769946 7740057.50954611,-165476.2273144 7740204.08556427,-163921.060080494 7742317.74875784,-162487.382495545 7743492.54812344,-157348.965917163 7742616.6181815,-156396.905832515 7740068.86505289,-157183.269514455 7736670.86012906,-163894.402468644 7727714.20819873,-165487.622303412 7723520.31447409,-166962.401247133 7722024.06869643,-169203.439600316 7720318.30847896,-171052.288217067 7718212.399079,-171815.325595969 7717147.40795928,-177243.225905937 7708019.08214255,-175874.360429684 7705042.43971118,-174790.985540933 7703968.89699978,-170169.018706367 7701928.41548901,-167751.067135541 7701386.41624881,-165999.391561191 7701170.99303456,-163751.220299314 7701172.15753481,-162097.06766959 7701309.23094831,-161088.47649046 7701644.15668032,-157812.743267148 7704129.53383198,-155658.231162775 7704423.97110763,-150200.455685701 7704729.70705275,-146605.200656553 7703231.66319173,-145404.61166918 7701630.51589993,-144511.983595682 7700451.91211029,-137664.694244109 7702672.07554991,-136420.096374266 7703191.92783008,-133946.236302602 7706156.74201391,-134762.551565298 7707862.3570048,-135169.82873082 7710617.727545,-134600.016679984 7712541.36441552,-132927.291241395 7715039.45613652,-131522.158900414 7715861.90750721,-130511.168458287 7716241.19548751,-128965.902145153 7716653.34023931,-127529.681739882 7716086.89891116,-124574.390027194 7714743.58053225,-123738.873059876 7715445.93904031,-121918.675379444 7722846.48972113,-119998.56546584 7735376.93502843,-120128.020950212 7742986.77262712,-119776.757631266 7746615.85453939,-116113.84335543 7750807.56586824,-113931.663005532 7752227.78985477,-111828.54846296 7751034.16967733,-110811.916008595 7749649.83911696,-109962.053622735 7748803.81770748,-108916.824514467 7748010.42863735,-107961.812640409 7747656.23258985,-106887.653772377 7747824.43565675,-105989.241712051 7748481.57968663,-102593.645562462 7750147.32948453,-100740.185035133 7749412.81753157,-99714.8548437979 7748842.59591169,-95100.0615822608 7748108.72139646,-86450.9858566984 7747727.9592509,-81998.3995095064 7747599.14160079,-79083.584617626 7748724.75621235,-73073.5209233568 7747647.20220975,-66276.4743419806 7746361.09503736,-64923.5930448664 7746074.76465547,-55713.4643777101 7742709.27407625,-54696.9747470598 7742157.65929787,-53334.4436116191 7741166.189382,-51538.2781240708 7739854.46155562,-49741.0223961371 7738515.18572935,-45813.2971181421 7735459.86989058,-43422.3912315307 7733213.56996318,-42138.3221531914 7732168.94563301,-40844.1177685937 7731389.58248135,-40175.7457148092 7730987.46980495,-39151.1130462061 7730413.66309331,-36267.3577554344 7729283.44105702,-34223.3393852479 7728168.73165259,-32089.1616103263 7726433.27896811,-30970.5540998093 7725240.49486343,-29597.7370979723 7723582.07868219,-28662.9454889426 7721710.98667943,-27335.1802313971 7719122.53487382,-26557.3800730052 7717855.84348102,-26472.8833794091 7717718.73123019,-24063.7851895414 7714811.49176184,-15421.2117609325 7705753.13487041,-10810.5574204371 7701763.88200424,-9102.96583461385 7700362.84803247,700.020671916506 7695108.64629651,2899.69049885707 7694474.58975993,14381.5678601113 7691927.77975866,21249.8004891459 7690584.45387939,26617.056722507 7690435.91400428,30391.5358212951 7689691.48978866,41871.9264446997 7685958.05162161,45555.4401785596 7685141.88406726,47474.275572454 7684263.70848249,51729.3525807039 7682151.26038332,53563.5636765536 7681035.94910429,56272.3762306781 7677417.28944434,57733.6661049849 7675111.43752765,59890.4370515388 7671986.58490454,61363.5217784856 7670534.31761979,62384.1031916628 7669971.10604897,65000 7668627.4112836)"

Attachments (1)

Single Sided Coastline.png (20.9 KB ) - added by MShepherd 7 years ago.

Download all attachments as: .zip

Change History (8)

by MShepherd, 7 years ago

Attachment: Single Sided Coastline.png added

comment:1 by strk, 7 years ago

Milestone: 3.6.13.6.2

Ticket retargeted after milestone closed

comment:2 by strk, 7 years ago

Milestone: 3.6.23.6.3

Ticket retargeted after milestone closed

comment:3 by robe, 6 years ago

Milestone: 3.6.33.6.4

comment:4 by mdavis, 4 years ago

See also this GISSE question for more examples of incorrect single-sided buffer output. It gives the following test cases:

Single-sided buffer, distance = -50

LineString (638327 331059, 638337 331048, 638337 331037, 638343 331023, 638358 331014, 638380 330991, 638382 330978, 638391 330966, 638410 330959, 638420 330953)

These are all caused by deficiencies in the single-sided buffer algorithm. Single-sided buffer, distance = -10

LineString (600296 172961, 600304 172962, 600307 172965, 600307 172969, 600307 172971, 600309 172974, 600308 172976, 600307 172979, 600306 172981, 600307 172982, 600311 172980, 600313 172979, 600317 172979, 600321 172982, 600325 172982, 600327 172979, 600328 172976, 600331 172974, 600338 172974)
Last edited 4 years ago by mdavis (previous) (diff)

comment:5 by strk, 3 years ago

Milestone: 3.6.43.6.6

Ticket retargeted after milestone closed

comment:7 by Sandro Santilli <strk@…>, 12 months ago

Resolution: fixed
Status: newclosed

In 091f6d9/git:

Only keep biggest polygon from single-sided buffer

Closes GH-665
Closes #810
Closes #712

Includes unit test

Note: See TracTickets for help on using tickets.