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
Issue Links
Activity
Jody Garnett
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
Tony Roth sent the following mail: {panel} Hi Developers, an issue ( 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: {code} 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); } {code} The CoordinateSequence isn't filled with coordinates? I might be on the wrong tack. Tony {panel} |
Tony Roth sent the following mail: {panel} Hi Developers, an issue ( 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: {code} 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); } {code} The CoordinateSequence isn't filled with coordinates? I might be on the wrong tack. Tony {panel} |
Jody Garnett
made changes -
Jody Garnett
made changes -
Jody Garnett
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | UDIG 1.2.0 [ 16264 ] |
Jody Garnett
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Closed [ 6 ] | Reopened [ 4 ] |
Jody Garnett
made changes -
| Fix Version/s | UDIG 1.2.RC2 [ 16287 ] | |
| Fix Version/s | UDIG 1.2.0 [ 16264 ] |
Jody Garnett
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Reopened [ 4 ] | Closed [ 6 ] |
GEOT-2974has a patch; waiting on a test case.