John Cartwright - NOAA Federal
2016-01-15 00:00:35 UTC
Hello All,
I'm confused about the isValidOp.setSelfTouchingRingFormingHoleValid(true)
method. Given a bow-tie polygon like the one below, I would have expected
setting the above option to cause the polygon to report as valid but it
doesn't.
â
Can someone please clarify for me?
Thanks!
--john
â//â
â//JTS version 1.14.0 with Groovy 2.4.5.â
//
wkt = '''POLYGON((1 1, 2 1, 1 2, 2 2, 1 1))'''
def geom = wktReader.read(wkt)
def validOp = new IsValidOp(geom)
validOp.setSelfTouchingRingFormingHoleValid(true)
//fails
assert geom.valid
I'm confused about the isValidOp.setSelfTouchingRingFormingHoleValid(true)
method. Given a bow-tie polygon like the one below, I would have expected
setting the above option to cause the polygon to report as valid but it
doesn't.
â
Can someone please clarify for me?
Thanks!
--john
â//â
â//JTS version 1.14.0 with Groovy 2.4.5.â
//
wkt = '''POLYGON((1 1, 2 1, 1 2, 2 2, 1 1))'''
def geom = wktReader.read(wkt)
def validOp = new IsValidOp(geom)
validOp.setSelfTouchingRingFormingHoleValid(true)
//fails
assert geom.valid