Skip to content

Instantly share code, notes, and snippets.

@barryrowlingson
Created January 3, 2019 09:48
Show Gist options
  • Save barryrowlingson/4665509c3c00c65ccdc0cc73b4ff10dd to your computer and use it in GitHub Desktop.
Save barryrowlingson/4665509c3c00c65ccdc0cc73b4ff10dd to your computer and use it in GitHub Desktop.
st_intersection failure
structure(list(structure(list(structure(c(313618.72893863, 313576.734104046,
313534.739269463, 313513.741852171, 313492.744434879, 313450.749600295,
313429.752183003, 313408.754765711, 313387.75734842, 313387.75734842,
313366.759931128, 313366.759931128, 313366.759931128, 313366.759931128,
313366.759931128, 313366.759931128, 313366.759931128, 313366.759931128,
313366.759931128, 313366.759931128, 313366.759931128, 313387.75734842,
313387.75734842, 313387.75734842, 313387.75734842, 313387.75734842,
313387.75734842, 313387.75734842, 313387.75734842, 313387.75734842,
313408.754765711, 313408.754765711, 313429.752183003, 313429.752183003,
313471.747017587, 313471.747017587, 313471.747017587, 313471.747017587,
313471.747017587, 313471.747017587, 313471.747017587, 313471.747017587,
313450.749600295, 313450.749600295, 313450.749600295, 313450.749600295,
313429.752183003, 313408.754765711, 313408.754765711, 313408.754765711,
313387.75734842, 313387.75734842, 313366.759931128, 313345.762513836,
313345.762513836, 313324.765096544, 313303.767679252, 313282.77026196,
313282.77026196, 313282.77026196, 313261.772844669, 313261.772844669,
313261.772844669, 313240.775427377, 313240.775427377, 313240.775427377,
313219.778010085, 313219.778010085, 313219.778010085, 313198.780592793,
313156.785758209, 313135.788340917, 313114.790923626, 313093.793506334,
313072.796089042, 313051.79867175, 313051.79867175, 313051.79867175,
313072.796089042, 313072.796089042, 313093.793506334, 313114.790923626,
313156.785758209, 313198.780592793, 313219.778010085, 313261.772844669,
313324.765096544, 313366.759931128, 313408.754765711, 313450.749600295,
313492.744434879, 313513.741852171, 313555.736686754, 313576.734104046,
313597.731521338, 313618.72893863, -5757726.46632974, -5757768.46059282,
-5757831.45198743, -5757831.45198743, -5757894.44338205, -5757915.44051359,
-5757957.43477667, -5757999.42903975, -5758020.42617129, -5758041.42330283,
-5758062.42043437, -5758083.41756591, -5758104.41469745, -5758125.41182899,
-5758146.40896052, -5758167.40609206, -5758188.4032236, -5758209.40035514,
-5758230.39748668, -5758251.39461822, -5758272.39174976, -5758293.3888813,
-5758314.38601284, -5758335.38314438, -5758356.38027592, -5758377.37740746,
-5758398.374539, -5758419.37167054, -5758440.36880208, -5758461.36593362,
-5758503.36019669, -5758524.35732823, -5758587.34872285, -5758629.34298593,
-5758671.33724901, -5758713.33151209, -5758755.32577517, -5758797.32003825,
-5758818.31716979, -5758839.31430133, -5758860.31143287, -5758881.3085644,
-5758860.31143287, -5758839.31430133, -5758818.31716979, -5758797.32003825,
-5758797.32003825, -5758755.32577517, -5758734.32864363, -5758713.33151209,
-5758692.33438055, -5758671.33724901, -5758650.34011747, -5758629.34298593,
-5758608.34585439, -5758587.34872285, -5758566.35159131, -5758545.35445977,
-5758524.35732823, -5758503.36019669, -5758503.36019669, -5758482.36306516,
-5758461.36593362, -5758440.36880208, -5758419.37167054, -5758398.374539,
-5758377.37740746, -5758356.38027592, -5758335.38314438, -5758314.38601284,
-5758272.39174976, -5758230.39748668, -5758230.39748668, -5758209.40035514,
-5758209.40035514, -5758167.40609206, -5758146.40896052, -5758125.41182899,
-5758125.41182899, -5758104.41469745, -5758104.41469745, -5758083.41756591,
-5758062.42043437, -5758020.42617129, -5757999.42903975, -5757978.43190821,
-5757936.43764513, -5757915.44051359, -5757873.44625051, -5757852.44911897,
-5757810.45485589, -5757789.45772436, -5757768.46059282, -5757726.46632974,
-5757726.46632974, -5757726.46632974), .Dim = c(96L, 2L))), class = c("XY",
"POLYGON", "sfg")), structure(list(structure(c(313366.759931128,
313303.767679252, 313303.767679252, 313303.767679252, 313303.767679252,
313303.767679252, 313303.767679252, 313303.767679252, 313303.767679252,
313282.77026196, 313282.77026196, 313282.77026196, 313261.772844669,
313261.772844669, 313261.772844669, 313261.772844669, 313261.772844669,
313261.772844669, 313261.772844669, 313261.772844669, 313261.772844669,
313261.772844669, 313261.772844669, 313261.772844669, 313261.772844669,
313240.775427377, 313219.778010085, 313219.778010085, 313198.780592793,
313177.783175501, 313156.785758209, 313135.788340917, 313114.790923626,
313093.793506334, 313051.79867175, 313030.801254458, 313009.803837166,
313009.803837166, 313009.803837166, 313009.803837166, 313009.803837166,
313009.803837166, 313009.803837166, 313030.801254458, 313030.801254458,
313030.801254458, 313051.79867175, 313051.79867175, 313072.796089042,
313072.796089042, 313072.796089042, 313093.793506334, 313114.790923626,
313135.788340917, 313156.785758209, 313177.783175501, 313177.783175501,
313177.783175501, 313198.780592793, 313219.778010085, 313219.778010085,
313240.775427377, 313261.772844669, 313282.77026196, 313303.767679252,
313303.767679252, 313324.765096544, 313345.762513836, 313366.759931128,
-5758923.30282748, -5759196.2655375, -5759217.26266904, -5759259.25693211,
-5759280.25406365, -5759301.25119519, -5759343.24545827, -5759385.23972135,
-5759427.23398443, -5759469.22824751, -5759511.22251059, -5759532.21964213,
-5759595.21103674, -5759637.20529982, -5759658.20243136, -5759679.1995629,
-5759742.19095752, -5759784.1852206, -5759805.18235214, -5759868.17374676,
-5759889.1708783, -5759910.16800984, -5759952.16227291, -5759973.15940445,
-5759994.15653599, -5759973.15940445, -5759973.15940445, -5759952.16227291,
-5759931.16514137, -5759931.16514137, -5759910.16800984, -5759910.16800984,
-5759889.1708783, -5759868.17374676, -5759847.17661522, -5759847.17661522,
-5759847.17661522, -5759826.17948368, -5759805.18235214, -5759784.1852206,
-5759763.18808906, -5759742.19095752, -5759721.19382598, -5759721.19382598,
-5759700.19669444, -5759658.20243136, -5759616.20816828, -5759574.21390521,
-5759553.21677367, -5759511.22251059, -5759469.22824751, -5759448.23111597,
-5759406.23685289, -5759364.24258981, -5759322.24832673, -5759280.25406365,
-5759259.25693211, -5759217.26266904, -5759175.26840596, -5759133.27414288,
-5759112.27701134, -5759091.2798798, -5759049.28561672, -5759007.29135364,
-5759007.29135364, -5758965.29709056, -5758944.29995902, -5758923.30282748,
-5758923.30282748), .Dim = c(69L, 2L))), class = c("XY", "POLYGON",
"sfg")), structure(list(structure(c(313680.507466966, 313696.41938261,
313696.41938261, 313696.41938261, 313696.41938261, 313673.322223589,
313648.125322838, 313625.028163817, 313599.831263067, 313574.634362317,
313574.634362317, 313551.537203296, 313526.340302546, 313526.340302546,
313503.243143525, 313478.046242775, 313478.046242775, 313454.949083754,
313454.949083754, 313429.752183003, 313406.655023982, 313381.458123232,
313356.261222482, 313333.164063461, 313284.87000369, 313259.673102939,
313211.379043168, 313163.084983397, 313114.790923626, 313041.299963104,
312993.005903333, 312944.711843562, 312896.41778379, 312873.320624769,
312848.123724019, 312848.123724019, 312848.123724019, 312848.123724019,
312848.123724019, 312873.320624769, 312896.41778379, 312944.711843562,
312993.005903333, 313018.202804083, 313066.496863854, 313114.790923626,
313259.673102939, 313503.243143525, 313680.507466966, -5757599.26983348,
-5757615.18153258, -5757640.37809043, -5757711.76833766, -5757808.35514274,
-5757955.33506352, -5758075.01871329, -5758221.99863407, -5758366.87884169,
-5758488.66220462, -5758633.54241224, -5758755.32577517, -5758877.1091381,
-5758996.79278787, -5759093.37959295, -5759215.16295588, -5759362.14287666,
-5759507.02308428, -5759677.09984975, -5759796.78349952, -5759895.47001776,
-5759966.86026499, -5760040.35022538, -5760088.64362792, -5760136.93703046,
-5760162.13358831, -5760185.230433, -5760210.42699085, -5760210.42699085,
-5760210.42699085, -5760210.42699085, -5760210.42699085, -5760210.42699085,
-5760210.42699085, -5760162.13358831, -5760136.93703046, -5760088.64362792,
-5760015.15366753, -5759895.47001776, -5759725.39325229, -5759555.31648682,
-5759362.14287666, -5759143.77270865, -5758948.49938533, -5758707.03237263,
-5758463.46564677, -5758075.01871329, -5757688.67149297, -5757599.26983348
), .Dim = c(49L, 2L))), class = c("XY", "POLYGON", "sfg")), structure(list(
structure(c(313387.75734842, 313387.75734842, 313387.75734842,
313387.75734842, 313408.754765711, 313408.754765711, 313408.754765711,
313429.752183003, 313429.752183003, 313429.752183003, 313429.752183003,
313429.752183003, 313429.752183003, 313429.752183003, 313408.754765711,
313387.75734842, 313387.75734842, 313387.75734842, 313387.75734842,
313387.75734842, 313366.759931128, 313366.759931128, 313345.762513836,
313324.765096544, 313282.77026196, 313261.772844669, 313240.775427377,
313219.778010085, 313219.778010085, 313219.778010085, 313219.778010085,
313219.778010085, 313219.778010085, 313240.775427377, 313261.772844669,
313282.77026196, 313324.765096544, 313324.765096544, 313009.803837166,
313009.803837166, 313009.803837166, 313009.803837166, 313009.803837166,
313009.803837166, 313009.803837166, 312988.806419875, 312988.806419875,
312988.806419875, 312988.806419875, 312988.806419875, 312988.806419875,
313009.803837166, 313030.801254458, 313051.79867175, 313093.793506334,
313135.788340917, 313135.788340917, 313156.785758209, 313261.772844669,
313366.759931128, 313366.759931128, 313366.759931128, 313366.759931128,
313366.759931128, 313366.759931128, 313366.759931128, 313345.762513836,
313324.765096544, 313324.765096544, 313345.762513836, 313387.75734842,
-5758545.35445977, -5758587.34872285, -5758608.34585439,
-5758629.34298593, -5758629.34298593, -5758713.33151209,
-5758734.32864363, -5758755.32577517, -5758776.32290671,
-5758797.32003825, -5758860.31143287, -5758881.3085644, -5758902.30569594,
-5758944.29995902, -5758986.2942221, -5759028.28848518, -5759175.26840596,
-5759217.26266904, -5759238.25980057, -5759259.25693211,
-5759301.25119519, -5759322.24832673, -5759322.24832673,
-5759322.24832673, -5759322.24832673, -5759343.24545827,
-5759385.23972135, -5759427.23398443, -5759469.22824751,
-5759490.22537905, -5759511.22251059, -5759532.21964213,
-5759553.21677367, -5759658.20243136, -5759742.19095752,
-5759931.16514137, -5759952.16227291, -5759994.15653599,
-5759826.17948368, -5759784.1852206, -5759763.18808906, -5759742.19095752,
-5759700.19669444, -5759658.20243136, -5759637.20529982,
-5759595.21103674, -5759511.22251059, -5759490.22537905,
-5759469.22824751, -5759427.23398443, -5759406.23685289,
-5759322.24832673, -5759301.25119519, -5759280.25406365,
-5759259.25693211, -5759217.26266904, -5759196.2655375, -5759175.26840596,
-5759049.28561672, -5758923.30282748, -5758902.30569594,
-5758818.31716979, -5758797.32003825, -5758776.32290671,
-5758755.32577517, -5758713.33151209, -5758692.33438055,
-5758587.34872285, -5758566.35159131, -5758545.35445977,
-5758545.35445977), .Dim = c(71L, 2L))), class = c("XY",
"POLYGON", "sfg")), structure(list(structure(c(313534.739269463,
313534.739269463, 313534.739269463, 313534.739269463, 313534.739269463,
313534.739269463, 313534.739269463, 313534.739269463, 313534.739269463,
313534.739269463, 313534.739269463, 313534.739269463, 313534.739269463,
313534.739269463, 313534.739269463, 313534.739269463, 313534.739269463,
313534.739269463, 313534.739269463, 313534.739269463, 313534.739269463,
313534.739269463, 313534.739269463, 313534.739269463, 313534.739269463,
313534.739269463, 313513.741852171, 313492.744434879, 313492.744434879,
313492.744434879, 313471.747017587, 313450.749600295, 313450.749600295,
313429.752183003, 313408.754765711, 313366.759931128, 313345.762513836,
313324.765096544, 313303.767679252, 313282.77026196, 313261.772844669,
313219.778010085, 313177.783175501, 313093.793506334, 312988.806419875,
312904.816750707, 312862.821916123, 312778.832246956, 312736.837412372,
312673.845160497, 312610.852908621, 312589.855491329, 312547.860656746,
312547.860656746, 312547.860656746, 312547.860656746, 312547.860656746,
312547.860656746, 312547.860656746, 312547.860656746, 312547.860656746,
312547.860656746, 312568.858074038, 312589.855491329, 312589.855491329,
312610.852908621, 312631.850325913, 312652.847743205, 312673.845160497,
312694.842577789, 312715.839995081, 312736.837412372, 312736.837412372,
312757.834829664, 312778.832246956, 312820.82708154, 312862.821916123,
312904.816750707, 312925.814167999, 312946.811585291, 312967.809002583,
312988.806419875, 313030.801254458, 313051.79867175, 313072.796089042,
313093.793506334, 313114.790923626, 313135.788340917, 313156.785758209,
313198.780592793, 313240.775427377, 313282.77026196, 313303.767679252,
313324.765096544, 313366.759931128, 313387.75734842, 313408.754765711,
313429.752183003, 313450.749600295, 313471.747017587, 313513.741852171,
313513.741852171, 313534.739269463, 313534.739269463, 313555.736686754,
313576.734104046, 313576.734104046, 313576.734104046, 313597.731521338,
313618.72893863, 313618.72893863, 313618.72893863, 313618.72893863,
313618.72893863, 313618.72893863, 313618.72893863, 313618.72893863,
313618.72893863, 313618.72893863, 313618.72893863, 313597.731521338,
313597.731521338, 313576.734104046, 313576.734104046, 313555.736686754,
313555.736686754, 313534.739269463, -5758301.78773392, -5758322.78486546,
-5758553.75331239, -5758616.74470701, -5758658.73897009, -5758679.73610163,
-5758700.73323317, -5758721.7303647, -5758784.72175932, -5758826.7160224,
-5758868.71028548, -5758931.7016801, -5758973.69594318, -5759036.6873378,
-5759078.68160088, -5759120.67586395, -5759162.67012703, -5759225.66152165,
-5759288.65291627, -5759351.64431089, -5759414.63570551, -5759435.63283705,
-5759456.62996858, -5759477.62710012, -5759519.6213632, -5759561.61562628,
-5759645.60415244, -5759687.59841552, -5759708.59554706, -5759729.5926786,
-5759750.58981014, -5759792.58407321, -5759834.57833629, -5759876.57259937,
-5759918.56686245, -5759960.56112553, -5760002.55538861, -5760044.54965169,
-5760065.54678323, -5760086.54391477, -5760107.54104631, -5760128.53817785,
-5760128.53817785, -5760149.53530938, -5760149.53530938, -5760149.53530938,
-5760107.54104631, -5760023.55252015, -5759939.56399399, -5759855.57546783,
-5759708.59554706, -5759561.61562628, -5759393.63857397, -5759267.65578473,
-5759183.66725857, -5759120.67586395, -5759057.68446934, -5759015.69020626,
-5758994.69307472, -5758910.70454856, -5758847.71315394, -5758805.71889086,
-5758742.72749624, -5758700.73323317, -5758679.73610163, -5758616.74470701,
-5758553.75331239, -5758469.76478623, -5758385.77626007, -5758301.78773392,
-5758259.79347084, -5758238.7963393, -5758217.79920776, -5758196.80207622,
-5758133.8106816, -5758070.81928698, -5757986.83076083, -5757923.83936621,
-5757902.84223467, -5757881.84510313, -5757860.84797159, -5757818.85370851,
-5757776.85944543, -5757755.86231389, -5757734.86518235, -5757734.86518235,
-5757713.86805081, -5757692.87091927, -5757692.87091927, -5757671.87378773,
-5757671.87378773, -5757650.8766562, -5757650.8766562, -5757650.8766562,
-5757650.8766562, -5757650.8766562, -5757650.8766562, -5757650.8766562,
-5757650.8766562, -5757671.87378773, -5757692.87091927, -5757713.86805081,
-5757734.86518235, -5757755.86231389, -5757755.86231389, -5757776.85944543,
-5757818.85370851, -5757839.85084005, -5757839.85084005, -5757860.84797159,
-5757881.84510313, -5757944.83649775, -5757986.83076083, -5758028.8250239,
-5758070.81928698, -5758112.81355006, -5758154.80781314, -5758175.80494468,
-5758196.80207622, -5758217.79920776, -5758217.79920776, -5758238.7963393,
-5758238.7963393, -5758259.79347084, -5758280.79060238, -5758301.78773392,
-5758301.78773392), .Dim = c(127L, 2L))), class = c("XY", "POLYGON",
"sfg"))), class = c("sfc_POLYGON", "sfc"), precision = 0, bbox = structure(c(312547.860656746,
-5760210.42699085, 313696.41938261, -5757599.26983348), .Names = c("xmin",
"ymin", "xmax", "ymax"), class = "bbox"), crs = structure(list(
epsg = 32721L, proj4string = "+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs"), .Names = c("epsg",
"proj4string"), class = "crs"), n_empty = 0L)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment