Skip to main content

I have a donut geometry (see WKT below) which I am trying to validate. Using the GeometryValidator only looking for self intersections I get an error on the start/end point of the outer ring:

 

WorkspaceError report:

Error detailsCoordinates from the inspector:

Outer ring coordinate list 

I would expect this to not be reported as a self intersection since polygons normally require intersection at exactly that point.

 

Why is FME reporting this? I have tried using both FME Desktop 2021.2 and 2022 beta.

 

Geometry WKT:

 

POLYGON Z ((558000 6142955.0838 0,558000 6142917.0404 0,557997.11 6142919.37 0,557989.1699999999 6142921.13 0,557985.12 6142922 0,557980.8300000001 6142923.23 0,557976.28 6142926.07 0,557969.0900000001 6142930.65 0,557964.65 6142933.45 0,557957.52 6142934.96 0,557954.37 6142937.05 0,557952.6699999999 6142938.1 0,557951.45 6142938.28 0,557950.3 6142937.8 0,557949 6142936.3 0,557948.13 6142930.34 0,557949.23 6142924.47 0,557953.26 6142917.84 0,557961.4 6142913.23 0,557968.81 6142907.49 0,557974.75 6142903.11 0,557980.95 6142900.52 0,557986.0700000001 6142897.05 0,557989.6599999999 6142893.94 0,557991.38 6142892.98 0,557992.54 6142892.22 0,557993.7 6142891.9 0,557995.55 6142892.56 0,558000 6142894.7645 0,558000 6142611.246 0,557996.48 6142612.52 0,557984.5900000001 6142616.81 0,557970.02 6142621.83 0,557962.47 6142594.29 0,557961.9199999999 6142592.35 0,557961.2 6142589.8 0,557967.04 6142587.38 0,557981.0700000001 6142581.19 0,557998.4 6142573.82 0,558000 6142573.2283 0,558000 6142273.8027 0,557992.77 6142242.15 0,557995.06 6142240.16 0,558000 6142240.5618 0,558000 6142000 0,557000 6142000 0,557000 6143000 0,557938.0048 6143000 0,557936.7 6142996.57 0,557940.02 6142978.96 0,557917.49 6142923.27 0,557939.4299999999 6142918.95 0,557948.74 6142940.38 0,557961.5900000001 6142966.85 0,557973.3200000001 6142955.93 0,557977.54 6142951.23 0,557980.21 6142946.6 0,557981.73 6142945.51 0,557983.0900000001 6142943.7 0,557985.8300000001 6142941.95 0,557990.12 6142942.07 0,557992.27 6142943.7 0,557992.0900000001 6142946.78 0,557996.73 6142951.4 0,558000 6142955.0838 0),(557487.12 6142405.75 25.819999999999936,557476.14 6142376.56 27.84999999999991,557467.19 6142370.55 27.84999999999991,557497.0800000001 6142361.09 27.84999999999991,557538.25 6142356.43 27.84999999999991,557574.4199999999 6142362.33 27.84999999999991,557608.11 6142370.06 27.84999999999991,557610.54 6142379.65 26.329999999999927,557545.75 6142377.31 25.819999999999936,557544.73 6142405.52 25.819999999999936,557487.12 6142405.75 25.819999999999936),(557807.5700000001 6142654.41 23.269999999999982,557804.24 6142655.06 23.100000000000023,557798.9 6142655.82 23.00999999999999,557797.76 6142653.04 22.860000000000014,557795.2 6142651.5 22.960000000000036,557788.79 6142637.47 22.600000000000023,557784.01 6142623 22.41999999999996,557780.65 6142606.16 22.25,557777.9099999999 6142584.81 22.07000000000005,557784.85 6142584.31 22.600000000000023,557819.5 6142578.71 23.879999999999995,557845.0800000001 6142576.5 24.3599999999999,557846.1 6142590.42 24.3599999999999,557852.9099999999 6142630.9 23.07000000000005,557853.51 6142633.27 22.980000000000018,557854.1799999999 6142635.89 22.91999999999996,557837.64 6142643.32 23.100000000000023,557832.6699999999 6142645.27 23.149999999999977,557819.81 6142650.31 23.269999999999982,557812.71 6142652.84 23.269999999999982,557807.5700000001 6142654.41 23.269999999999982),(557300.15 6142608.92 28.279999999999973,557299.9299999999 6142610.23 28.6099999999999,557297 6142632.44 28,557295.0700000001 6142648.71 27.40000000000009,557285.94 6142648.24 27.40000000000009,557276.1599999999 6142647.48 27.230000000000018,557253.19 6142646.3 26.34999999999991,557253.23 6142651.09 26.34999999999991,557252.72 6142656.58 26.34999999999991,557217.49 6142653.63 25.269999999999982,557214.47 6142653.47 25.269999999999982,557203.2 6142654 24.950000000000045,557203.4099999999 6142617.09 26.1400000000001,557202.6599999999 6142599.59 26.430000000000064,557203.11 6142598.22 26.49000000000001,557217.3400000001 6142599.72 26.700000000000045,557226.51 6142600.62 26.829999999999927,557237.06 6142601.76 27.09999999999991,557243.6599999999 6142602.49 27.24000000000001,557255.61 6142603.85 27.50999999999999,557268.6799999999 6142605.24 27.6400000000001,557286.96 6142607.51 28.190000000000055,557300.15 6142608.92 28.279999999999973),(557961.2 6142589.8 23.940000000000055,557951.28 6142593.91 23.889999999999986,557947.81 6142595.46 23.860000000000014,557948.5900000001 6142598.12 23.850000000000023,557949.37 6142600.77 23.850000000000023,557960.64 6142635.44 23.470000000000027,557950.3400000001 6142642.56 23.450000000000045,557936.94 6142650.03 23.149999999999977,557928.8 6142654.91 22.879999999999995,557922.65 6142657.41 22.519999999999982,557918.38 6142658.07 22.279999999999973,557914.8300000001 6142657.75 22.210000000000036,557912.4099999999 6142655.95 22.190000000000055,557910.6699999999 6142653.3 22.16999999999996,557909.28 6142651.09 22.25999999999999,557905.48 6142645.29 22.299999999999955,557898.01 6142632.03 22.67999999999995,557893.53 6142623.9 22.809999999999945,557900.37 6142620.79 22.899999999999977,557899.6799999999 6142619.32 22.970000000000027,557898.4099999999 6142616.62 22.980000000000018,557900.47 6142615.72 23.019999999999982,557899.65 6142612.86 23.139999999999986,557898.9 6142610.22 23.25999999999999,557894.87 6142595.12 23.91999999999996,557890.9299999999 6142578.02 24.809999999999945,557925.29 6142574.34 24.660000000000082,557924.0900000001 6142567.95 24.950000000000045,557942.4 6142564.19 24.910000000000082,557949.38 6142562.73 24.910000000000082,557953.05 6142561.96 24.88000000000011,557953.97 6142561.37 24.88000000000011,557959.8400000001 6142585.58 24.15000000000009,557960.3200000001 6142587.07 24.1099999999999,557961.2 6142589.8 23.940000000000055),(557182.98 6142298.05 29.190000000000055,557231.03 6142292.8 29.190000000000055,557266.03 6142292.64 26.38000000000011,557286.51 6142293.83 26.38000000000011,557302.71 6142300.26 26.38000000000011,557331.81 6142319.35 25.980000000000018,557342.77 6142330.65 25.980000000000018,557364.04 6142344.23 26.38000000000011,557372.6599999999 6142352.94 26.38000000000011,557368.1699999999 6142365.26 27.180000000000064,557357.5700000001 6142368.18 27.980000000000018,557339.6599999999 6142364.92 27.980000000000018,557329.86 6142370.65 27.980000000000018,557318.76 6142383.88 28.38000000000011,557297.49 6142389.89 28.38000000000011,557276.9199999999 6142388.91 28.38000000000011,557266.29 6142382.18 29.339999999999918,557253.8300000001 6142374.25 27.690000000000055,557242.6599999999 6142369.75 27.269999999999982,557230.46 6142363.66 27.269999999999982,557208.26 6142358.85 31.579999999999927,557192.79 6142353.96 30.15000000000009,557181.76 6142341.99 29.190000000000055,557181.49 6142337.43 29.190000000000055,557193.99 6142334.57 29.190000000000055,557185.78 6142308.3 29.190000000000055,557182.98 6142298.05 29.190000000000055),(557866.04 6142883.39 31.670000000000073,557866.1699999999 6142807.65 30.75,557864.98 6142772.67 30.450000000000045,557867.7 6142759.05 30.1400000000001,557883.75 6142758.78 30.1400000000001,557922.23 6142739.69 30.88000000000011,557933.64 6142735.08 30.88000000000011,557942.7 6142732.83 30.50999999999999,557949.37 6142739.31 30.50999999999999,557962.27 6142774.88 36.25,557962.36 6142790.79 36.25,557950.37 6142810.15 33.8599999999999,557946.4299999999 6142814.82 33.8599999999999,557957.63 6142823.55 33.8599999999999,557969.12 6142836.02 32.91000000000008,557989.88 6142862.75 28.59999999999991,557995.0700000001 6142870.45 27.6400000000001,557984.0700000001 6142879.25 27.160000000000082,557964.5 6142901.54 25.25,557952.61 6142894.6 25.25,557939.3 6142891.76 25.25,557924.99 6142878.53 27.6400000000001,557920.13 6142866.6 27.6400000000001,557887.4199999999 6142878.4 33.38000000000011,557866.04 6142883.39 31.670000000000073),(557841.36 6142312.74 19.620000000000005,557845.14 6142326.29 19.620000000000005,557844.06 6142332.57 19.850000000000023,557832.94 6142372.7 20.549999999999955,557826.3200000001 6142397.38 20.549999999999955,557816.29 6142420.97 19.850000000000023,557804.53 6142436.25 19.620000000000005,557803.9299999999 6142436.92 19.620000000000005,557781.86 6142448 19.620000000000005,557782.73 6142463.4 19.620000000000005,557779.46 6142515.8 21.710000000000036,557771.72 6142515.64 21.399999999999977,557744.5 6142515.11 20.309999999999945,557653.95 6142502.28 20.309999999999945,557641.45 6142499.44 20.840000000000032,557625.3300000001 6142495.78 21.50999999999999,557628.12 6142435.84 19.590000000000032,557622.5 6142432.56 19.620000000000005,557602.77 6142409.73 19.850000000000023,557566.8200000001 6142393.47 19.620000000000005,557590.38 6142386.23 19.850000000000023,557610.54 6142379.65 19.850000000000023,557620.5900000001 6142374.73 19.850000000000023,557647.99 6142374.48 19.850000000000023,557691 6142377.45 19.850000000000023,557722.38 6142376.87 19.850000000000023,557726.1599999999 6142373.92 19.91999999999996,557735.19 6142366.87 20.08000000000004,557740.5800000001 6142368.27 20.08000000000004,557744.85 6142365.66 19.620000000000005,557841.36 6142312.74 19.620000000000005))

I cannot reproduce the self-intersection by copy-pasting the WKT above. What happens if you try inserting a CoordinateRounder with e.g. 5 digit precision before the GeometryValidator?


I just tried that and I still get a self intersection error on the feature. In any case why should it change anything since the start/end point in this case has less precision?

 

I have looked a bit closer at the polygon and reducing to 2D and using the coordinate rounder with 5 for x and y I get the WKT below. There is another place where the inner rings intersect:

 

A real self intersectingI don't get a report on that self intersection, could it be that I get a wrong location?

 

POLYGON ((558000 6142955.0838,558000 6142917.0404,557997.11 6142919.37,557989.17 6142921.13,557985.12 6142922,557980.83 6142923.23,557976.28 6142926.07,557969.09 6142930.65,557964.65 6142933.45,557957.52 6142934.96,557954.37 6142937.05,557952.67 6142938.1,557951.45 6142938.28,557950.3 6142937.8,557949 6142936.3,557948.13 6142930.34,557949.23 6142924.47,557953.26 6142917.84,557961.4 6142913.23,557968.81 6142907.49,557974.75 6142903.11,557980.95 6142900.52,557986.07 6142897.05,557989.66 6142893.94,557991.38 6142892.98,557992.54 6142892.22,557993.7 6142891.9,557995.55 6142892.56,558000 6142894.7645,558000 6142611.246,557996.48 6142612.52,557984.59 6142616.81,557970.02 6142621.83,557962.47 6142594.29,557961.92 6142592.35,557961.2 6142589.8,557967.04 6142587.38,557981.07 6142581.19,557998.4 6142573.82,558000 6142573.2283,558000 6142273.8027,557992.77 6142242.15,557995.06 6142240.16,558000 6142240.5618,558000 6142000,557000 6142000,557000 6143000,557938.0048 6143000,557936.7 6142996.57,557940.02 6142978.96,557917.49 6142923.27,557939.43 6142918.95,557948.74 6142940.38,557961.59 6142966.85,557973.32 6142955.93,557977.54 6142951.23,557980.21 6142946.6,557981.73 6142945.51,557983.09 6142943.7,557985.83 6142941.95,557990.12 6142942.07,557992.27 6142943.7,557992.09 6142946.78,557996.73 6142951.4,558000 6142955.0838),(557487.12 6142405.75,557476.14 6142376.56,557467.19 6142370.55,557497.08 6142361.09,557538.25 6142356.43,557574.42 6142362.33,557608.11 6142370.06,557610.54 6142379.65,557545.75 6142377.31,557544.73 6142405.52,557487.12 6142405.75),(557807.57 6142654.41,557804.24 6142655.06,557798.9 6142655.82,557797.76 6142653.04,557795.2 6142651.5,557788.79 6142637.47,557784.01 6142623,557780.65 6142606.16,557777.91 6142584.81,557784.85 6142584.31,557819.5 6142578.71,557845.08 6142576.5,557846.1 6142590.42,557852.91 6142630.9,557853.51 6142633.27,557854.18 6142635.89,557837.64 6142643.32,557832.67 6142645.27,557819.81 6142650.31,557812.71 6142652.84,557807.57 6142654.41),(557300.15 6142608.92,557299.93 6142610.23,557297 6142632.44,557295.07 6142648.71,557285.94 6142648.24,557276.16 6142647.48,557253.19 6142646.3,557253.23 6142651.09,557252.72 6142656.58,557217.49 6142653.63,557214.47 6142653.47,557203.2 6142654,557203.41 6142617.09,557202.66 6142599.59,557203.11 6142598.22,557217.34 6142599.72,557226.51 6142600.62,557237.06 6142601.76,557243.66 6142602.49,557255.61 6142603.85,557268.68 6142605.24,557286.96 6142607.51,557300.15 6142608.92),(557961.2 6142589.8,557951.28 6142593.91,557947.81 6142595.46,557948.59 6142598.12,557949.37 6142600.77,557960.64 6142635.44,557950.34 6142642.56,557936.94 6142650.03,557928.8 6142654.91,557922.65 6142657.41,557918.38 6142658.07,557914.83 6142657.75,557912.41 6142655.95,557910.67 6142653.3,557909.28 6142651.09,557905.48 6142645.29,557898.01 6142632.03,557893.53 6142623.9,557900.37 6142620.79,557899.68 6142619.32,557898.41 6142616.62,557900.47 6142615.72,557899.65 6142612.86,557898.9 6142610.22,557894.87 6142595.12,557890.93 6142578.02,557925.29 6142574.34,557924.09 6142567.95,557942.4 6142564.19,557949.38 6142562.73,557953.05 6142561.96,557953.97 6142561.37,557959.84 6142585.58,557960.32 6142587.07,557961.2 6142589.8),(557182.98 6142298.05,557231.03 6142292.8,557266.03 6142292.64,557286.51 6142293.83,557302.71 6142300.26,557331.81 6142319.35,557342.77 6142330.65,557364.04 6142344.23,557372.66 6142352.94,557368.17 6142365.26,557357.57 6142368.18,557339.66 6142364.92,557329.86 6142370.65,557318.76 6142383.88,557297.49 6142389.89,557276.92 6142388.91,557266.29 6142382.18,557253.83 6142374.25,557242.66 6142369.75,557230.46 6142363.66,557208.26 6142358.85,557192.79 6142353.96,557181.76 6142341.99,557181.49 6142337.43,557193.99 6142334.57,557185.78 6142308.3,557182.98 6142298.05),(557866.04 6142883.39,557866.17 6142807.65,557864.98 6142772.67,557867.7 6142759.05,557883.75 6142758.78,557922.23 6142739.69,557933.64 6142735.08,557942.7 6142732.83,557949.37 6142739.31,557962.27 6142774.88,557962.36 6142790.79,557950.37 6142810.15,557946.43 6142814.82,557957.63 6142823.55,557969.12 6142836.02,557989.88 6142862.75,557995.07 6142870.45,557984.07 6142879.25,557964.5 6142901.54,557952.61 6142894.6,557939.3 6142891.76,557924.99 6142878.53,557920.13 6142866.6,557887.42 6142878.4,557866.04 6142883.39),(557841.36 6142312.74,557845.14 6142326.29,557844.06 6142332.57,557832.94 6142372.7,557826.32 6142397.38,557816.29 6142420.97,557804.53 6142436.25,557803.93 6142436.92,557781.86 6142448,557782.73 6142463.4,557779.46 6142515.8,557771.72 6142515.64,557744.5 6142515.11,557653.95 6142502.28,557641.45 6142499.44,557625.33 6142495.78,557628.12 6142435.84,557622.5 6142432.56,557602.77 6142409.73,557566.82 6142393.47,557590.38 6142386.23,557610.54 6142379.65,557620.59 6142374.73,557647.99 6142374.48,557691 6142377.45,557722.38 6142376.87,557726.16 6142373.92,557735.19 6142366.87,557740.58 6142368.27,557744.85 6142365.66,557841.36 6142312.74))


It looks to me that it's reporting the incorrect location for the error. If you attempt repair, it changes the start point of the outer polygon to this location and the 'hole' is now not a hole but part of the outer boundary of the polygon (an inversion) and the repaired polygon has only 6 donut holes

 

imageSo I think the geometry validator is correctly reporting an invalid geometry but the location it is reporting is incorrect.

 


It looks to me that it's reporting the incorrect location for the error. If you attempt repair, it changes the start point of the outer polygon to this location and the 'hole' is now not a hole but part of the outer boundary of the polygon (an inversion) and the repaired polygon has only 6 donut holes

 

imageSo I think the geometry validator is correctly reporting an invalid geometry but the location it is reporting is incorrect.

 

So two different self intersections but the geometryvalidator only reports one - and the location is wrong. Should this be reported somewhere?


Reply