[Jts-topo-suite-user] SymDifference
Brought to you by:
dr_jts
From: <su...@ti...> - 2011-11-28 12:28:11
|
I have the following situation: LinearRing linearRing1 = geometryFactory.createLinearRing(new Coordinate[]{ new Coordinate(2, 2), new Coordinate(2, 4), new Coordinate(1, 4), new Coordinate (1, 2), new Coordinate(2, 2) }); Polygon polygon1 = geometryFactory.createPolygon(linearRing1, null); LinearRing linearRing2 = geometryFactory.createLinearRing(new Coordinate[]{ new Coordinate(4, 1), new Coordinate(4, 3), new Coordinate(3, 3), new Coordinate(3, 1), new Coordinate(4, 1) }); Polygon polygon2 = geometryFactory.createPolygon(linearRing2, null); Why does polygon1.symDifference(polygon2) return MULTIPOLYGON (((2 2, 1 2, 1 4, 2 4, 2 2)), ((4 1, 3 1, 3 3, 4 3, 4 1)))? I seem that the valid result should be POLYGON((3 2, 1 2, 1 4, 3 4, 3 3, 4 3, ...))! Can you help me??? E' nata indoona: chiama, videochiama e messaggia Gratis. Scarica indoona per iPhone, Android e PC: http://www.indoona.com/ |