Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: UDIG 1.2.RC1
-
Fix Version/s: UDIG 1.2.RC2
-
Component/s: tools and editing
-
Labels:None
Description
Tony Roth sent the following mail:
Hi Developers,
an issue (GEOT-2958) that has been fixed for Geotools 2.6.2 causes an
incorrect behaviour of the PolygonTool. Finishing the creation of polygons
with a double click ends up in an error dialog, saying something like "The
geometry resulting from the edit is invalid. Undo the last edit command
(Ctrl+Z) and try again".
I think the reason for this could be the last modification of the
JTSUtilities class in gt-shapefile-2.6.2.jar. Have a look at the nested loop
in the following method:
public static final LinearRing reverseRing(LinearRing lr) { GeometryFactory gf = lr.getFactory(); CoordinateSequenceFactory csf = gf.getCoordinateSequenceFactory(); CoordinateSequence csOrig = lr.getCoordinateSequence(); int numPoints = csOrig.size(); int dimensions = csOrig.getDimension(); CoordinateSequence csNew = csf.create(numPoints, dimensions); for (int i = 0; i < numPoints; i++) { for (int j = 0; j < dimensions; j++) { csOrig.getOrdinate(i, j); } } return gf.createLinearRing(csNew); }
The CoordinateSequence isn't filled with coordinates?
I might be on the wrong tack.
Tony