@Test public void testBuildInValidPolygonWith2InnerRings() { String testfile = "invalid-polygon-2-inner-rings.wkt"; List<TDWay> ways = MockingUtils.wktPolygonToWays(testfile); Polygon polygon = JTSUtils.buildPolygon(ways.get(0), ways.subList(1, ways.size())); Geometry expected = MockingUtils.readWKTFile(testfile); Assert.isTrue(!polygon.isValid()); Assert.equals(expected, polygon); }
static Polygon buildPolygon(TDWay way) { Coordinate[] coordinates = JTSUtils.toCoordinates(way); return GEOMETRY_FACTORY.createPolygon(GEOMETRY_FACTORY.createLinearRing(coordinates), null); }
JTSUtils { static Polygon buildPolygon(TDWay way) { Coordinate[] coordinates = JTSUtils.toCoordinates(way); return GEOMETRY_FACTORY.createPolygon(GEOMETRY_FACTORY.createLinearRing(coordinates), null); } }
JTSUtils { static Polygon buildPolygon(TDWay way) { Coordinate[] coordinates = JTSUtils.toCoordinates(way); return GEOMETRY_FACTORY.createPolygon(GEOMETRY_FACTORY.createLinearRing(coordinates), null); } private  JTSUtils(); }
JTSUtils { static Polygon buildPolygon(TDWay way) { Coordinate[] coordinates = JTSUtils.toCoordinates(way); return GEOMETRY_FACTORY.createPolygon(GEOMETRY_FACTORY.createLinearRing(coordinates), null); } private  JTSUtils(); static Coordinate toCoordinate(TDNode node); static Coordinate[] toCoordinates(TDWay way); static Geometry toJtsGeometry(TDWay way, List<TDWay> innerWays); }
JTSUtils { static Polygon buildPolygon(TDWay way) { Coordinate[] coordinates = JTSUtils.toCoordinates(way); return GEOMETRY_FACTORY.createPolygon(GEOMETRY_FACTORY.createLinearRing(coordinates), null); } private  JTSUtils(); static Coordinate toCoordinate(TDNode node); static Coordinate[] toCoordinates(TDWay way); static Geometry toJtsGeometry(TDWay way, List<TDWay> innerWays);  }