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

Issue with Polygon IsValidOp: Cannot compute the quadrant for point ( 0.0, 0.0 ) #843

Closed
fleddj opened this issue Feb 24, 2022 · 2 comments · Fixed by #845
Closed

Issue with Polygon IsValidOp: Cannot compute the quadrant for point ( 0.0, 0.0 ) #843

fleddj opened this issue Feb 24, 2022 · 2 comments · Fixed by #845

Comments

@fleddj
Copy link

fleddj commented Feb 24, 2022

I have the following Polygon:

POLYGON ((163894.115 474277.836, 163892.196 474278.362, 163891.541 474278.538, 163886.418 474279.908, 163871.608 474283.863, 163867.155 474284.997, 163864.339 474285.659, 163843.308 474290.44, 163841.76 474290.803, 163835.278 474292.268, 163825.918 474294.15, 163822.426 474294.734, 163822.06 474294.792, 163802.83 474284.079, 163721.038 474238.308, 163704.17 474228.868, 163698.017 474231.864, 163693.713 474233.96, 163693.894 474234.073, 163692.806 474234.401, 163692.592 474234.505, 163702.763 474241.137, 163713.489 474248.131, 163713.533 474248.159, 163712.096 474248.159, 163709.934 474248.426, 163679.028 474257.876, 163660.382 474263.24, 163643.085 474267.753, 163631.265 474270.647, 163616.706 474273.712, 163591.675 474277.799, 163586.311 474278.822, 163581.969 474278.822, 163579.415 474278.054, 163576.606 474276.522, 163554.895 474261.452, 163535.483 474247.149, 163531.652 474244.595, 163528.076 474243.317, 163524.5 474241.529, 163520.669 474240.763, 163518.006 474240.94, 163513.433 474259.381, 163511.726 474266.778, 163511.446 474268.592, 163507.149 474265.358, 163498.649 474260.821, 163496.959 474258.793, 163488.366 474252.707, 163484.415 474251.336, 163478.685 474247.516, 163476.583 474246.43, 163479.291 474235.144, 163480.313 474234.889, 163474.475 474234.721, 163471.373 474234.632, 163469.401 474242.719, 163400.943 474207.35, 163355.791 474174.35, 163316.338 474115.305, 163302.484 474045.656, 163303.335 474028.621, 163299.739 474010.539, 163295.672 473990.094, 163295.967 473988.609, 163295.405 473985.782, 163303.276 473946.211, 163306.131 473931.857, 163282.053 473897.313, 163281.364 473895.817, 163280.767 473893.098, 163279.153 473890.683, 163279.022 473890.023, 163278.464 473889.188, 163267.437 473833.751, 163235.299 473751.59, 163222.656 473684.563, 163236.662 473614.149, 163254.386 473587.623, 163255.065 473590.313, 163261.05 473588.726, 163349.191 473558.368, 163386.19 473655.004, 163396.954 473682.432, 163401.589 473694.654, 163401.649 473694.813, 163401.687 473694.913, 163401.731 473695.029, 163404.582 473702.55, 163431.881 473774.55, 163449.496 473820.442, 163421.256 473839.076, 163414.624 473843.45, 163409.774 473846.89, 163321.685 473905.317, 163321.453 473905.472, 163321.636 473906.448, 163325.062 473924.691, 163326.502 473932.358, 163327.044 473935.241, 163327.231 473936.237, 163329.769 473949.751, 163331.557 473959.27, 163335.669 473960.732, 163419.602 474008.04, 163489.229 474047.285, 163491.015 474048.302, 163520.719 474065.231, 163566.024 474090.94, 163579.086 474066.427, 163586.135 474052.567, 163596.663 474035.09, 163597.907 474032.538, 163599.451 474030.018, 163601.695 474027.228, 163606.032 474023.023, 163616.234 474011.479, 163619.276 474007.396, 163619.981 474006.451, 163623.684 474001.482, 163625.2 474000, 163633.993 473991.408, 163638.709 473987.039, 163649.758 473975.804, 163651.381 473973.789, 163652.824 473972.219, 163654.271 473971.201, 163656.562 473969.371, 163665.55 473964.231, 163680.914 473955.164, 163696.968 473944.78, 163711.181 473935.625, 163728.681 473926.415, 163732.544 473924.941, 163733.853 473924.442, 163733.859 473924.439, 163740.173 473922.031, 163742.19 473921.077, 163748.241 473918.331, 163752.719 473915.966, 163757.717 473913.102, 163763.498 473908.903, 163768.728 473904.809, 163772.734 473901.674, 163780.679 473894.823, 163789.342 473886.489, 163799.683 473876.513, 163809.257 473868.983, 163818.879 473859.904, 163819.874 473858.389, 163820.879 473857.293, 163823.024 473854.987, 163825.644 473852.169, 163826.111 473851.667, 163832.562 473845.595, 163842.881 473836.07, 163857.433 473825.751, 163866.165 473820.724, 163892.358 473808.288, 163920.14 473795.059, 163950.831 473778.92, 163977.581 473766.89, 163953.085 473695.241, 163947.914 473683.774, 163946.169 473678.671, 163944.528 473670.356, 163943.587 473659.367, 163942.002 473627.028, 163941.611 473619.056, 163940.447 473595.309, 163939.336 473567.743, 163938.877 473556.372, 163938.877 473543.498, 163942.963 473522.128, 163929.142 473527.797, 163906.848 473537.845, 163887.528 473546.168, 163886.437 473546.638, 163862.572 473556.686, 163821.934 473573.35, 163821.938 473573.344, 163831.494 473491.146, 163831.952 473487.212, 163832.463 473482.815, 163832.751 473480.34, 163832.898 473473.551, 163831.382 473470.367, 163831.031 473469.625, 163825.25 473465.594, 163824.335 473465.51, 163824.209 473465.496, 163819.945 473465.042, 163819.792 473465.025, 163815.5 473464.563, 163798.922 473464, 163791.542 473461.53, 163783.422 473458.813, 163780.321 473459.92, 163775.287 473461.717, 163774.331 473462.059, 163771.787 473462.967, 163771.331 473458.132, 163768.818 473431.489, 163758.866 473325.974, 163758.864 473325.951, 163758.861 473325.928, 163758.854 473325.853, 163758.264 473319.563, 163753.641 473322.083, 163747.396 473324.798, 163736.534 473328.058, 163722.143 473331.315, 163713.453 473334.031, 163691.187 473343.806, 163660.231 473355.754, 163638.508 473364.715, 163620.314 473373.132, 163618.512 473374.087, 163607.817 473379.75, 163605.598 473381.072, 163574.696 473399.472, 163555.145 473412.234, 163551.886 473413.32, 163549.6 473413.822, 163540.753 473415.764, 163527.991 473417.936, 163509.504 473422.232, 163497.035 473425.54, 163488.162 473428.671, 163483.204 473430.421, 163471.782 473435.587, 163456.675 473444.084, 163450.756 473447.413, 163445.991 473450.093, 163441.508 473452.615, 163440.998 473452.901, 163441.167 473452.507, 163454.136 473422.246, 163470.989 473385.377, 163500.635 473316.207, 163518.393 473274.771, 163563.889 473182.181, 163556.842 473182.181, 163561.239 473180.244, 163562.24 473179.828, 163583.963 473170.867, 163588.217 473169.169, 163614.943 473158.854, 163633.056 473150.902, 163643.316 473146.733, 163653.791 473143.138, 163662.481 473140.422, 163668.849 473138.547, 163677.996 473136.249, 163678.921 473136.039, 163680.992 473135.093, 163683.986 473133.868, 163692.853 473130.562, 163704.972 473126.794, 163717.305 473123.802, 163729.803 473121.598, 163742.416 473120.191, 163755.093 473119.587, 163767.783 473119.789, 163780.434 473120.794, 163792.996 473122.601, 163805.418 473125.2, 163817.65 473128.582, 163829.644 473132.733, 163841.349 473137.636, 163852.72 473143.272, 163863.711 473149.617, 163874.278 473156.647, 163884.377 473164.333, 163893.968 473172.644, 163903.013 473181.546, 163911.475 473191.005, 163919.32 473200.981, 163920.165 473202.207, 163924.854 473194.91, 163932.379 473184.69, 163940.536 473174.968, 163949.294 473165.783, 163958.617 473157.172, 163968.467 473149.17, 163974.266 473145.04, 163962.221 473163.633, 163959.468 473168.069, 163956.557 473172.757, 163952.782 473178.106, 163951.842 473179.18, 163946.174 473185.657, 163873.456 473251.814, 163865.63 473258.336, 163864.142 473259.225, 163865.809 473262.125, 163867.613 473265.264, 163872.551 473262.426, 163887.654 473247.324, 163946.489 473194.152, 163957.501 473183.14, 163965.337 473173.477, 163965.344 473173.469, 163965.67 473173.067, 163966.94 473171.5, 163971.974 473163.947, 163977.076 473156.72, 163979.531 473153.25, 163988.922 473140.594, 163992.848 473135.304, 163992.845 473135.297, 163993.998 473133.744, 163994.813 473132.318, 164000.776 473129.123, 164004.41 473127.464, 164004.971 473128.654, 164009.488 473126.837, 164009.702 473126.751, 164017.546 473123.596, 164044.362 473163.728, 164075.545 473209.387, 164107.06 473281.306, 164082.216 473292.648, 164089.594 473308.313, 164114.08 473297.327, 164115.134 473299.733, 164089.597 473308.319, 164089.591 473308.322, 164089.857 473308.896, 164089.915 473309.02, 164089.973 473309.144, 164110.103 473352.179, 164102.388 473355.697, 164102.191 473355.787, 164101.995 473355.877, 164089.188 473361.718, 164089.188 473361.718, 164093.016 473369.031, 164138.319 473463.036, 164141.497 473469.631, 164164.47 473517.299, 164170.619 473512.853, 164186.26 473545.046, 164200.166 473573.672, 164216.489 473607.861, 164233.587 473644.235, 164233.813 473644.125, 164240.455 473642.096, 164242.221 473641.42, 164240.972 473638.533, 164218.218 473590.114, 164197.051 473545.929, 164168.151 473486.347, 164172.557 473485.568, 164172.974 473486.133, 164207.635 473556.115, 164231.844 473608.635, 164233.703 473612.668, 164246.242 473639.88, 164249.438 473638.656, 164253.516 473637.375, 164308.363 473611.366, 164315.063 473608.189, 164316.197 473610.576, 164318.593 473612.688, 164245.335 473645.735, 164247.094 473651.886, 164248.806 473657.865, 164242.464 473660.831, 164239.57 473655.374, 164236.557 473649.695, 164236.469 473649.719, 164187.219 473673.031, 164150.891 473690.25, 164145.181 473692.507, 164107.215 473710.71, 164066.356 473730.299, 164064.131 473724.743, 164060.171 473712.685, 164056.984 473700.401, 164054.582 473687.939, 164052.976 473675.35, 164052.171 473662.684, 164052.171 473649.993, 164052.575 473643.636, 164049.505 473642.234, 164038.319 473636.241, 164027.535 473629.55, 164017.197 473622.188, 164016.051 473621.257, 164015.528 473623.574, 164011.952 473635.751, 164007.612 473647.677, 164002.523 473659.303, 163996.708 473670.584, 163990.187 473681.475, 163982.987 473691.934, 163975.194 473701.843, 163979.458 473710.48, 164003.998 473760.196, 163977.23 473773.03, 163961.049 473780.587, 163949.956 473785.887, 163922.692 473798.624, 163910.097 473805.305, 163901.141 473809.832, 163900.697 473810.052, 163873.807 473823.608, 163853.658 473833.766, 163848.704 473837.699, 163834.975 473850.064, 163824.924 473860.872, 163824.148 473861.718, 163823.045 473863.398, 163812.787 473873.077, 163803.237 473880.587, 163792.639 473890.811, 163784.396 473898.461, 163779.349 473902.649, 163779.19 473902.78, 163779.031 473902.912, 163775.981 473905.443, 163771.991 473908.332, 163766.785 473912.833, 163764.35 473914.779, 163762.007 473916.621, 163759.108 473918.704, 163756.235 473920.435, 163752.455 473922.409, 163748.302 473924.479, 163743.373 473926.629, 163738.408 473928.573, 163734.136 473930.143, 163729.923 473931.943, 163725.251 473933.798, 163718.056 473937.295, 163684.961 473958.531, 163667.609 473969.144, 163661.603 473972.539, 163659.771 473973.589, 163657.831 473974.87, 163655.872 473976.514, 163652.812 473979.322, 163649.6 473983.241, 163647.204 473985.734, 163644.473 473988.654, 163642.031 473991.044, 163639.391 473993.204, 163636.859 473995.209, 163634.346 473997.323, 163631.43 474000, 163630.092 474001.228, 163627.045 474004.933, 163624.588 474008.363, 163623.047 474011.182, 163622.247 474012.512, 163621.119 474013.901, 163618.614 474017.015, 163614.822 474021.152, 163611.235 474024.897, 163608.377 474027.801, 163606.447 474029.554, 163604.538 474031.737, 163602.348 474034.78, 163599.512 474038.909, 163595.996 474045.868, 163588.538 474059.587, 163581.045 474073.324, 163574.053 474087.259, 163574.55 474088.546, 163575.194 474089.478, 163576.126 474090.122, 163576.358 474091.401, 163576.555 474092.486, 163575.767 474093.561, 163575.194 474094.994, 163574.993 474095.871, 163592.915 474105.692, 163665.489 474145.793, 163770.284 474204.579, 163772.056 474205.592, 163773.92 474206.658, 163770.323 474208.489, 163894.115 474277.836), (164089.188 473361.718, 164084.909 473363.667, 164084.912 473363.673, 164089.188 473361.718))

When I try to create a new IsValidOp() for this Geometry I get an illegal argument exception: Cannot compute the quadrant for point ( 0.0, 0.0 )

Can somebody explain to me why this goes wrong?

The same check returns valid in version 1.15 of this library

@dr-jts
Copy link
Contributor

dr-jts commented Feb 24, 2022 via email

@fleddj
Copy link
Author

fleddj commented Feb 25, 2022

Thank you for your quick response. I'm afraid we cannot use the normalisation in our specific situation, so I'm looking forward to the fix.

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

Successfully merging a pull request may close this issue.

2 participants