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

Geometry.contains() function incorrect for linestring with same start and end coordinates #1050

Open
ctytgat opened this issue Apr 19, 2024 · 1 comment

Comments

@ctytgat
Copy link

ctytgat commented Apr 19, 2024

Consider the large geometry below (region of Flanders in Belgium). (EPSG:31370)

The following linestring
LINESTRING Z (154754.029 162698.619 103.086,154754.029 162698.619 101.426)
is contained in this region, but the geometry.contains() function says it's not.
Looks like it is caused by the the points being the same (the Z coordinate is not important)

To reproduce:

WKTReader wktReader = new WKTReader(new GeometryFactory(new PrecisionModel(), 31370));
Geometry geo = wktReader.read(<WKT below>);
Geometry geo2 = wktReader.read("LINESTRING Z (154754.029 162698.619 103.086,154754.029 162698.619 101.426)");
Geometry geo3 = wktReader.read("POINT Z (154754.029 162698.619 103.086)");
System.out.println(geo.contains(geo2));
System.out.println(geo.contains(geo3));

Will print

false
true

MULTIPOLYGON (((150281.02475000173 156184.90925000235, 144476.98212499917 153729.49287500232, 144461.01174999774 153724.75825000554, 141364.35150000453 153222.04962500185, 141350.0099999979 153222.62000000477, 141081.0298750028 153296.08999999985, 141073.97999999672 153298.25, 141048.19000001997 153307.89987500012, 133459.36912503093 156205.54412500188, 130993.75412499905 155049.08224999905, 130946.40799999982 155027.4549999982, 128096.6596249938 153813.62600000948, 123244.09000000358 153077.0399999991, 123085.81000002474 153058.3299999982, 123074.86000002176 153058.61987499893, 119091.4299999997 153299.28012499958, 117733.35000000149 153499.3798750043, 117561.46999999881 153644.41000000015, 116188.37624999881 155627.46262500063, 116184.89087499678 155633.57587499917, 116182.18062500656 155639.84250000492, 116157.03912501782 155713.73550000414, 116098.99662502855 155896.86250000447, 116098.22524999827 155901.21475000307, 116036.60000000149 159875.53000000492, 112571.34825002402 159122.6992500052, 112560.04062499106 159123.3470000103, 111899.76725002378 159215.94949999824, 108312.65299999714 159828.79899999872, 108144.77899999917 159874.98900000378, 105520.67650000006 162390.20524999872, 100917.0197500065 161142.39100000262, 98569.33775003254 157113.71525000036, 97888.30262500048 156976.67774999887, 93479.20775000751 157814.21775000542, 91617.42499999702 158352.15712500364, 91613.74537499994 158353.22837500274, 91609.0081249997 158355.9588750042, 91603.15574999899 158359.8102500029, 91597.39050002396 158364.55874999985, 91575.43187501281 158389.09175000712, 91529.62812502682 158527.11312500015, 91423.93500000238 161093.00200000033, 88484.47962500155 161145.30874999985, 88426.94912499934 161146.34174999967, 88418.90350001305 161146.5868749991, 85452.47237499803 161258.07712500542, 78795.1555000022 155928.62250000238, 78767.640625 155940.49437500536, 78620.60225001723 156003.9377500005, 77088.26600003242 156778.04425000772, 76999.30387502909 156839.9521250017, 76226.28000000119 157390.90700000525, 74011.280000031 160422.48000000417, 72112.83662500232 160588.45512500405, 66205.81875000894 161203.75237500295, 65866.04025000334 161324.49587500095, 65625.20000001788 161477.51999999955, 65522.39999999106 161568.24000000954, 65517.62000000477 161574.3200000003, 65514.009999997914 161579.86000000313, 65510.20000000298 161586.5300000012, 64392.18000000715 163781.0799999982, 59590.14999999851 163262.22000000253, 59350.37624999136 163237.15387499705, 59341.66899999231 163236.2557500042, 59333.73900000006 163235.6878749989, 55807.92000000179 162991.29000000283, 55758.49674999714 162999.79450000077, 55213.88000001758 163109.0399999991, 55180.460000000894 163122.31000000238, 55141.160000018775 163147.66000000387, 54898.23587503284 163344.0198750049, 54793.59525000304 163441.03824999928, 52191.28725001961 166853.7652500011, 50638.93262501061 163498.58962500095, 47962.32012499869 161737.0403750129, 47928.44037500024 161720.31174999848, 47923.730250000954 161718.67624999583, 47699.50725000352 161654.23450000212, 47297.853749997914 161549.31525000185, 46181.61962503195 161268.00750001147, 45929.53574999422 161270.71000000462, 45925.44224999845 161270.83974999934, 42935.93387500197 161482.24624999985, 44128.80124999583 156900.2037499994, 44129.428999997675 156893.38774999976, 44128.35837499797 156889.6711250022, 44121.38562499732 156880.08475000784, 44047.75962502509 156783.05725000426, 44035.70550002903 156767.6952500008, 43836.58287499845 156533.37025000155, 43691.08775000274 156402.09487500414, 43683.77049999684 156395.72174999863, 43679.99899999797 156392.98862501234, 43658.22012501955 156379.51562499627, 40578.10350000113 157247.23225000128, 39976.45462500304 157475.51587500423, 38545.94000001252 158429.96000000462, 38511.32925000042 158479.14300000668, 32713.125125028193 168315.02812500298, 27827.314499996603 168366.07237499952, 25383.602000012994 172431.80274999887, 25382.254249997437 172435.52362500504, 25359.782125011086 172580.56812499836, 25359.57012500614 172583.210125003, 24945.52000000328 180197.9847499989, 24946.780625008047 180210.71237500384, 24950.52800001949 180228.54825000092, 24951.397249996662 180232.6076250039, 24952.816250033677 180237.1367500052, 24962.174500003457 180266.14475000277, 27742.96537499875 183677.5697499998, 24038.650375001132 189635.10824999958, 23900.62000002712 190215.54999999702, 23879.780000001192 190307.07000000402, 23856.30000000447 190411.45000000298, 23848.95000000298 190444.73000001535, 21991.3811250031 199762.00275000557, 27002.02650000155 203066.81487500668, 38028.40262500197 208221.912750002, 48529.258250027895 215543.4427500032, 48552.60912502557 215557.029125005, 48793.56400000304 215690.86125000194, 48819.47775000334 215704.15412501618, 50868.44800001383 216410.28212500364, 60036.44212500006 222552.8967500031, 60452.87624999881 222774.88575000316, 62039.46249999851 223539.43737500533, 65730.78787499666 225153.4862499982, 66446.44025000185 227562.59874999896, 66471.8607499972 227626.17212500423, 66505.31075000018 227685.62125000358, 66575.88400000334 227796.54924999923, 66576.49437499791 227797.24074999988, 67399.8241250217 228601.66300000623, 67413.01250004023 228613.94875000417, 67610.39475002885 228743.74412500486, 67638.51737499237 228758.1962499991, 67649.8382499963 228760.00812500343, 68435.94962500036 228822.21375001222, 68441.75174999982 228822.6227500029, 68504.0380000025 228810.94625000283, 69574.30537500232 228599.06275000423, 69864.15975002944 228540.17762500048, 69923.83887500316 228527.55725000054, 69949.20475000143 228519.56387500465, 69970.4755000025 228511.64537500218, 70019.73662503064 228491.0866249986, 70055.21024999768 228471.3423750028, 70122.26775000244 228424.82762500644, 70929.71287502348 227852.91174999997, 71970.9667500332 227074.42924999818, 79978.8423750028 229719.600250002, 80777.99000000209 228143.04000001028, 81345.51999999583 226167.9600000009, 81462.39999999851 225378.59000001103, 81556.72999999672 218597.62999999896, 86579.80000000447 215059.1700000018, 91277.5399999991 215557.75, 90467.1799999997 220040.66000000015, 95693.47999999672 222075.19999999925, 106985.1400000006 217998.76000000164, 107203.41000001878 217901.51000000164, 108470.95999999344 217286.72000000626, 108473.61999999732 217285.1700000055, 108487.75999999791 217276.93000000343, 108784.80999999493 217103.30000000447, 109978.0399999991 216393.3500000015, 109586.54000002146 211851.63000000268, 116448.30000001192 212672.20000000298, 116451.8900000006 212672.06000000238, 119305.25 212347.7400000058, 125046.49000000209 214973.8200000152, 125156.6100000143 215022.0700000003, 125280.17999999225 215075.0700000003, 125284.1099999994 215076.5, 125288.30000002682 215077.80000000075, 130614.97999999672 216702.54000000283, 135421.09000000358 220060.49000001326, 141172.52000000328 227140.45000000298, 140107.68000002205 227786.76999999955, 139782.7599999979 228316.0700000003, 139634.6700000167 228740.51000000536, 139519.3900000006 229173.2199999988, 139472.2100000009 229359.76000000164, 142724.0099999979 229541.3200000003, 142753.9632499963 229542.99237500504, 143195.2400000021 229567.62999999896, 144727.2349999994 229653.1640000157, 145631.4769999981 229701.23800000548, 147226.96000002325 229758.83999999985, 147614.79999998957 229767.38300000876, 148748.67000000924 227656.95000000298, 151747.31000002474 227321.23000000417, 154382.29299999774 229473.55600000545, 151915.12999999523 232733.48900000006, 151590.01099999994 233164.02700000256, 151034.0099999979 234598.66600000486, 150734.65000000596 237460.64299999923, 150768.71500001848 237571.9299999997, 150968.99825000763 237844.1860000007, 155127.96237500757 239900.05312500522, 157452.1168750003 240957.16075000167, 157485.9870000109 240969.3801250048, 157498.85700000077 240971.44974999875, 157502.86687500775 240972.00975001603, 161770.40112500638 241436.18500000238, 161999.89474999905 241105.62424999848, 162465.86862500757 240426.91637500376, 161250.45087500662 237432.1325000003, 164324.42999999225 235929.55000001565, 170931.54999998957 235230.59999999776, 170707.7599999979 237236.51000000536, 176663.26675000042 243430.5376250036, 177163.0972500071 243713.98087500036, 177170.27000001073 243717.46000000462, 177624.18999999762 243866.52000000328, 177796.51000000536 243922.9299999997, 177854.38000001013 243941.7400000021, 177899.45000001043 243956.35000000522, 177921.18000002205 243963.37000001222, 178125.27000000328 244027.2100000009, 178133.0099999979 244025.9900000058, 178474.42000000924 243957.08000000194, 178618.5799999982 243914.13000000268, 179852.35000000894 243434.5399999991, 180904.0700000003 242960.5700000152, 180985.42000000924 242915.61000000313, 180994.86000000685 242908.84000000358, 181037.8600000143 242877.9200000055, 182859.78000000864 241353.32000000402, 182869.75037500262 241342.82837500423, 183033.28350000829 238933.44825000316, 183032.77350001037 238930.70825001225, 183026.5637499988 238918.58825000376, 182972.65512502193 238816.6075000018, 182915.18774999678 238736.83137499914, 182861.0767500028 238685.96599999815, 182850.26700000465 238675.94575000927, 181962.42000000924 238010.20000000298, 182882.82424999774 234857.24525000528, 182764.3938750103 234561.8962500021, 182540.05150001496 234277.3272500001, 178176.56000000238 235826.2100000009, 178871.20000000298 233543.8299999982, 182739.64000000805 233985.01000000164, 183469.33799999952 233954.37787500024, 183533.21337500215 233950.9905000031, 183539.6731249988 233950.43387499824, 184171.92450000346 233850.37124999985, 184174.3357499987 233846.7805000022, 184205.3547500074 233536.61275000125, 185120.4008750096 234016.03325001523, 185148.87925001234 234026.64975000545, 185190.97174999863 234041.8513750024, 185214.26450000703 234048.88487500325, 185771.3267500028 234212.3323750049, 185908.34375 234230.8336250037, 185954.45099999756 234231.6547500007, 185973.56700000912 234231.1893749982, 185990.05312500894 234229.66250000522, 186960.0361250043 234019.43787500262, 187183.07787500322 233896.6177500002, 188914.1597499922 232371.99749999866, 191352.7548750043 234900.18550001457, 194530.51087500155 240239.0384999998, 194581.77462500334 240394.74049999937, 194609.86662501097 240478.1616250053, 194613.6168750003 240488.31174999848, 194616.06700000167 240493.26175000146, 195345.6778749898 241479.2362499982, 195361.08862499893 241498.81625001132, 195372.41900001466 241511.03625000268, 195407.50025000423 241547.51637500152, 196155.59425000846 242175.53487500176, 196318.71750000864 242186.8422500044, 196547.22125001997 242152.38749999925, 199357.5753750056 240445.09750001505, 199361.97325000167 240440.99787500873, 199376.06525000185 240426.80012499914, 201177.29000000656 235996.40000000224, 199127.45000001043 232222.14000000432, 202087.22000000626 228192.45000000298, 203156.8810000047 226636.17000000924, 204863.83000000566 222715.30000000075, 207964.60000002384 223974.85000000522, 210892.10000000894 222080.53000000492, 210910.64000000805 222067.8999999985, 210568.18000000715 217275.98999999836, 212421.56000000983 217811.46000000462, 217056.85000000894 217471.9000000134, 218202.63000001013 218881.70000000298, 218220.13000000268 218877.04000000283, 218238.40200001 218872.16787500307, 219115.43999999762 218638.3100000061, 221019.68000000715 218129.78000000492, 227712.40999999642 221730.45000000298, 227864.98000000417 221712.46000000462, 228026.41000000387 221691.62000000477, 230005.37000000477 221212.32000000402, 232877.94000000507 218080.55000000075, 232893.29000000656 218053.04999999702, 235213.82000000775 212395.70000000298, 238615.4299999997 211069.24999999627, 239302.8299999982 210765.69999999925, 239745.1000000164 210519.26999999955, 240589.40000000596 209269.28000000492, 246255.1400000155 209727.91000000015, 246497.9000000134 209641.1000000015, 247771.45000001043 209109.9600000009, 251805.25 207422.95000000298, 251872.77000000328 207379.13000000268, 251958.54000000656 207310.82000000402, 251969.94000000507 207301.66000000387, 251991.3500000015 207283.8900000006, 251995.88000001013 207279.87000000477, 252014.31000000238 207263.32000000775, 252019.28000000864 207257.8299999982, 252399.37000001967 206833.48000001162, 254053.77000000328 204885.2800000012, 252584.25000000745 199790.85000000522, 252523.05000001192 199596.00000000373, 248760.09000000358 191187.45000001416, 247695.8500000015 183389.3000000082, 247672.14000000805 183290.37999999896, 247623.8999999985 183188.62000001222, 245490.10999999195 178956.80000000075, 245393.9200000018 178768.2400000021, 245346.3500000015 178680.01000000536, 245330.8811250031 178657.43075000495, 245290.72000000626 178598.80999999866, 239692.45000000298 171068.1099999994, 242964.32000000775 167657.71000000462, 242990.08000002056 167212.88000000268, 242996.16000000387 166989.74000000954, 242996.1000000015 166980.20000000298, 242995.6799999997 166971.05000001565, 242990.1499999985 166910.77000000328, 242988.42000000924 166901.05000000075, 242986.83000000566 166895.12999999896, 242985.09999999404 166890.6499999985, 242931.4600000009 166786.8400000073, 229224.87000000477 158027.86275000498, 228365.40200000256 157585.83662500232, 225106.88000001013 156933, 224273.64000000805 157023.7400000021, 219269.90000002086 159998.37000001222, 216429.8900000006 156821.15000000224, 216418.64000000805 156813.15000000224, 216050.8900000006 156576.6400000006, 216040.39000000805 156570.64000000432, 212675.12625000626 156435.56000000238, 206957.65999999642 156306.80999999866, 207357.64000000805 155266.21000000462, 207365.93999999762 155229.18000000343, 207178.94000000507 155011.2400000021, 207166.61000000685 154997.12000000104, 206982.0099999979 154806.31000000238, 206937.8200000003 154761.2100000009, 206918.15999999642 154741.68000000343, 206911.4700000286 154735.48000000045, 206356.79000000656 154272.6099999994, 206277.63000000268 154208.1600000076, 206244.0000000149 154188.58000000194, 206232.9299999997 154182.51000000164, 205100.23199999332 154162.82200000435, 199559.1787500009 155335.49724999815, 197679.68675000966 157208.91212499887, 193570.72962500155 162262.50937500224, 191287.43500000983 160211.48699999973, 189295.3308750242 159277.56500000507, 187950.73200001568 160021.24587500468, 187927.186999999 160053.3187500015, 187664.25375000387 161249.1626250036, 182905.7718750015 161465.245250009, 177720.4540000111 165856.8730000034, 174448.9299999997 164329.18000000343, 169091.3207499981 162690.31924999878, 170220.45325000584 160869.78725000098, 170226.51637500525 160859.1086250022, 170231.78612499684 160831.21737501398, 170210.86187500507 160520.93175000325, 170210.50774999708 160518.32937500253, 170209.20199999958 160514.5, 170206.98500002176 160510.53887500986, 170017.29475001246 160257.40174999833, 169394.74825000763 159528.2951250039, 168756.3851249963 159154.63650000468, 166681.08987499774 158971.7199999988, 164611.80224999785 159662.07499999925, 160966.69000000507 157432.64000000432, 160913.0700000003 157435.8501250036, 160910.54000000656 157436.58000000194, 160289.9699999988 157647.37000000104, 159948.28012500703 157849.69000000134, 156517.91737499833 160402.10375000164, 154908.4742500037 159009.9357500039, 153909.62125001103 158372.57500000298, 150281.02475000173 156184.90925000235), (162805.82067819685 211183.84419930354, 162805.82067819661 211183.8441993111, 162735.74360001087 211213.5236000046, 162805.82067819685 211183.84419930354), (199668.23400084674 183431.2296396643, 199889.02362586558 183564.32376467064, 199668.23660318553 183431.23120838404, 199668.23400084674 183431.2296396643), (87220.21100004017 176529, 87208.02300000191 176527.78000001237, 87208.02324949205 176527.7788197212, 87220.21100004017 176529), (130058.46129725128 176964.08984966576, 130052.55462501943 176957.3041249998, 130058.4612972528 176964.08984966436, 130058.46129725128 176964.08984966576), (135629.2649874278 214223.3308470457, 135629.26610157546 214223.33104884572, 135605.89699999988 214303.52699999884, 135629.2649874278 214223.3308470457), (146775.29566401988 190723.9491447918, 146771.35824999958 190710.51725000143, 146775.29658197612 190723.9488923736, 146775.29566401988 190723.9491447918), (157051.98432947695 187194.8606450744, 157051.98392798007 187194.8611383885, 157054.72212500125 187191.49662500247, 157051.98432947695 187194.8606450744), (55838.9144257905 170107.8403591777, 55838.91494398564 170107.84014788643, 55866.292999997735 170144.96900000423, 55838.9144257905 170107.8403591777), (158134.6750907302 210932.65791016817, 158191.57989999652 210940.63520000502, 158134.6750907153 210932.65791016817, 158134.6750907302 210932.65791016817), (161942.44962500036 210976.08975000307, 161942.86029401422 210976.3104111515, 161942.86029400548 210976.31041115426, 161942.44962500036 210976.08975000307), (159580.23371236006 162673.66069752802, 159583.01590000838 162664.2752000019, 159580.2337123601 162673.66069752802, 159580.23371236006 162673.66069752802), (161066.343448208 160760.47494334565, 161075.79634967135 160754.60229365889, 161075.79634967138 160754.60229365894, 161066.343448208 160760.47494334565), (64790.004000000656 197940.7190000154, 64797.68461484919 197926.93203119925, 64797.68492308259 197926.9326019734, 64790.004000000656 197940.7190000154), (184978.65000000596 233754.58999999985, 184858.51000000536 233614.20000000298, 185004.3599999994 233646.64000000432, 184978.65000000596 233754.58999999985)), ((188951.25 232970.85000000522, 188863.0700000003 233318.26000000536, 189258.8299999982 233403.9699999988, 189455.4699999988 233440.40000000224, 189492.5700000003 233083.6300000064, 189500.60000000894 233000.38000001386, 189497.79999999702 233000.2199999988, 189325.26000001281 232990.76000000536, 188951.25 232970.85000000522)), ((189795.7899999991 236262.97000000253, 189754.04000000656 236329.86000000313, 189738.88000001013 236356.2800000012, 189723.09000000358 236426.64999999478, 189785.3599999994 236441.62000001222, 189785.25000000745 236442.87000000104, 189877.04000000656 236465.25000000373, 189903.05000000447 236372.1700000055, 189917.56000000238 236316.30000000447, 189795.7899999991 236262.97000000253)), ((257053.7199999988 163280.2100000009, 258719.5930000022 159856.2410000041, 258871.83924999833 159422.10725000128, 256971.18575000763 156570.2560000047, 252677.16962499917 156909.33612500504, 252478.55325000733 156938.58362499997, 251997.18512501568 157074.52525001392, 251986.76137501746 157078.3982499987, 243279.1440000087 160896.2480000034, 243101.8900000155 161025.61600001156, 242749.71762499958 161300.21912500262, 242736.15600000322 161324.2190000005, 242704.77900000662 161434.7720000036, 242671.44475001097 161571.968249999, 242669.31012500077 161601.3177500032, 248517.29999999702 164490.5799999982, 248538.15999999642 164494.01999999955, 248710.61000000685 164521.98000000045, 249063.28000000864 164578.83000000194, 249331.27000001073 164551.75, 257053.7199999988 163280.2100000009)), ((188890.4600000009 237846.55000000075, 188925.15974999964 237800.85800000653, 188958.74000000954 237756.64000000805, 188920.59424999356 237731.3307500109, 188908.43000000715 237723.2600000091, 188864.16875000298 237772.56487500295, 188834.98000000417 237805.08000000194, 188890.4600000009 237846.55000000075)), ((190575.13000001013 237994.66000000015, 190277.2100000009 237687.8900000006, 190268.31000000238 237678.7899999991, 189743.0700000003 237435.92999999598, 189726.6099999994 237433.03000000492, 189347.78000000864 237687.6499999985, 189232.57000000775 237915.0300000012, 190365.790000014 238368.05000000447, 190507.23000000417 238390.3200000003, 190598.67000000924 238159.85000000522, 190575.13000001013 237994.66000000015), (189866.6799999997 237915.40000000224, 189828.36999999732 237913.62999999896, 189824.2599999979 237742.90000000224, 189866.6799999997 237915.40000000224)), ((188982.93000000715 237917.68000000343, 189068.81000000983 238013.51000000164, 189144.6000000015 237885.48000000417, 189143.2847500071 237884.6507499963, 189090.54537499696 237851.39937500283, 189051.8587500006 237827.0081249997, 189047.0399999991 237823.97000000253, 189045.63425000757 237826.02475000173, 189027.04825000465 237853.19200000167, 188991.56037499756 237905.06487499923, 188982.93000000715 237917.68000000343)), ((189895.65999999642 238325.00000000373, 189902.86000000685 238342.73000000417, 190043 238364.51000000536, 190053.13000000268 238311.39000000432, 190004.82000000775 238297.76999999955, 189953.84000001103 238283.6499999985, 189906.72999999672 238271.1400000006, 189895.65999999642 238325.00000000373)), ((190359.95000001043 238397.5700000003, 190337.12000000477 238394.7899999991, 190317.22000002116 238530.9200000018, 190337.16000000387 238535.71000000462, 190375.18000000715 238544.83000000194, 190389.9600000009 238455.23000000045, 190359.95000001043 238397.5700000003)), ((189854.290000014 238555.11000000313, 189751.87000001222 238563.8900000006, 189758.13000001013 238597.8500000015, 189821.7899999991 238591.50000001118, 189854.290000014 238555.11000000313)), ((184599.53999999166 233884.85000000894, 184579.97999999672 233959.48000000045, 184664.77000001073 233971.96000000462, 184701.1000000015 233896.01000000164, 184702.60012500733 233892.63862499967, 184722.76000000536 233847.3300000131, 184618.27000001073 233837.76000000536, 184599.53999999166 233884.85000000894)), ((185241.79999999702 234162.62000000477, 185142.20000001043 234103.32000000775, 185136.34000000358 234099.89000000805, 185132.17000000924 234097.6000000015, 185126.18000002205 234094.34000000358, 185108.53000000864 234145.27000000328, 185174.7599999979 234189.58999999985, 185207.9600000009 234211.75, 185241.79999999702 234162.62000000477)), ((182878.79999999702 234350.81000000238, 182843.84000001103 234301.32000000402, 182753.60000000894 234350.0300000161, 182696.7400000021 234381.04000000283, 182700.77000000328 234386.09000000358, 182784.24000000954 234450.8299999982, 182810.26000001281 234457.79000000283, 182815.81000000238 234455.22000000253, 182820.60000000894 234450.93000000343, 182878.79999999702 234350.81000000238)), ((186358.05000000447 234967.03000000492, 186214.00000002235 234991.55000000075, 186158.75000000745 235129.16000000015, 186265.20000001043 235195.41000000015, 186365.0799999982 235142.78000000492, 186368.16000001878 235140.69000000507, 186417.98999999464 235065.12000000477, 186358.05000000447 234967.03000000492)), ((188247.9105000049 237286.13599999994, 188244.56000000238 237274.20000000298, 188225.56000000983 237229.7899999991, 188204.57000000775 237229.02999999747, 188198.8900000006 237287.44000000507, 188206.92900000513 237295.77625000477, 188214.580000028 237303.71000001207, 188242.8900000006 237295.2199999988, 188249.84000000358 237293.01000000536, 188247.9105000049 237286.13599999994)), ((189722.3500000015 236203.89000000432, 189734.79999999702 235923.48000000045, 189708.63000000268 235828.30000000075, 189463.2100000009 235684.20000000298, 189451.18999999762 235684.73999999836, 189076.1099999994 235737.9200000055, 188951.73000000417 235796.73000000417, 188053.75 236281.19000000134, 187988.16000000387 236328.58000000194, 188415.98000000417 237232.6700000055, 188208.25400003046 237490.5710000135, 188227.70099999756 237545.63699999824, 188273.69800001383 237610.875, 188284.21000000834 237618.0840000026, 188285.59700001776 237619.03500000015, 188535.93000000715 237670.34000001103, 188605.37000000477 237552.4200000055, 188577.58999999613 237533.2400000021, 188479.7100000009 237487.08000000194, 188888.12000000477 237254.78000000492, 189406.61000002176 237562.15000000224, 189411.72999999672 237557.38000000268, 189586.70000000298 237382.3599999994, 189651.1799999997 237255.51000000164, 189687.16000000387 237061.48999999836, 189322.3999999985 237058.26000000536, 189714.0399999991 236796.85000000522, 189720.70000001043 236769.19000000134, 189748.83000000566 236637.8299999982, 189686.52500000596 236538.90262500197, 189723.09000000358 236426.64999999478, 189676.31000000238 236416.37000000104, 189722.3500000015 236203.89000000432), (189402.25 236580.23999999836, 189409.21000000834 236431.1700000055, 189502.60000000894 236441.7199999988, 189402.25 236580.23999999836), (189121.37000000477 236325.73000000417, 189216.09000000358 236461.5700000003, 189121.85000000894 236457.91000000015, 189121.37000000477 236325.73000000417), (189126.03000000864 236476.23000001162, 189142.20000002533 236539.0700000003, 189076.74000000954 236537.02999999747, 189126.03000000864 236476.23000001162), (188519.6400000006 236855.1400000006, 188494.57000002265 236591.25000000745, 188661.84000000358 236755.1099999994, 188519.6400000006 236855.1400000006), (189182.06000000238 236725.4200000018, 189186.1862500012 236856.76925000176, 189070.69000000507 236840.7199999988, 189182.06000000238 236725.4200000018), (189414.5300000012 236131.8900000006, 189317.89000000805 236124.35000000522, 189323.6499999985 235959.69000000507, 189414.5300000012 236131.8900000006)), ((189775.10000000894 236782.60000000522, 189879.68000000715 236807.84999999776, 189864.53000000864 236864.36000000313, 189936.73525000364 236878.16475000232, 189938.2800000012 236878.4600000158, 189878.23000000417 236649.27000000328, 189818.99000002444 236631.3200000003, 189794.33000000566 236691.83000000194, 189793.94174999 236693.6622500047, 189775.10000000894 236782.60000000522)), ((189821.51999999583 236857.77000000328, 189828.17000000924 236829.69000000134, 189712.27000001073 236803.7199999988, 189705.36000000685 236831.7100000009, 189821.51999999583 236857.77000000328)), ((189739.94000000507 237058.9900000021, 189701.18000000715 237060.83000000194, 189664.00000000745 237260.71000000462, 189714.86000000685 237276.36000000313, 189735.68999999762 237195.54000000283, 189739.94000000507 237058.9900000021)), ((190386.10000000894 237455.37999999896, 190396.8999999985 237419.83000000194, 190398.00000000745 237415.13000000268, 190405.3599999994 237270.4200000018, 189993.73000000417 237266.9500000067, 189989.9699999988 237282.19000000134, 190128.35000000894 237439.5300000012, 190253.43000000715 237500.81999999657, 190342.8500000015 237481.0900000073, 190357.25000000745 237477.69000000134, 190386.10000000894 237455.37999999896)), ((189785.45000000298 237448.03000000492, 189864.06000000983 237476.98999999836, 189878.3200000003 237431.22000000253, 189800 237402.33000000194, 189785.45000000298 237448.03000000492)), ((188724.63000000268 237396.89000000432, 188615.78000000864 237556.72000000253, 188708.18999999762 237590.83999999985, 188808.1700000018 237448.04000001028, 188724.63000000268 237396.89000000432)), ((189149.45287501067 237719.31362500042, 189180.73000000417 237740.1799999997, 189195.05737499893 237748.1264999993, 189204.149375014 237753.16925000027, 189245.8900000006 237776.32000000402, 189246.40124998987 237775.4511250034, 189280.11512500048 237718.1457500048, 189299.5311250016 237685.14324999973, 189303.31000000238 237678.7199999988, 189259.40000000596 237653.08999999985, 189153.31000000238 237595.23000001162, 189125.77000000328 237633.81000000238, 189125.06000000983 237703.0399999991, 189149.45287501067 237719.31362500042)), ((182499.41000000387 237785.87000000477, 182531.1500000134 237742.3599999994, 182500.7800000161 237703.01999999955, 182467.25000000745 237748.98000000417, 182473.97000000626 237757.14000000432, 182499.41000000387 237785.87000000477)))

@dr-jts
Copy link
Contributor

dr-jts commented May 13, 2024

This is because JTS currently treats zero-length LineStrings as invalid. Consequently the spatial predicates do not return the results that might be expected. (See also #345)

This is fixed in the forthcoming RelateNG implementation.

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

No branches or pull requests

2 participants