Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.6.2
-
Fix Version/s: 2.6.3
-
Component/s: shapefile plugin
-
Labels:None
-
Environment:java 1.6
geotools-2.6.2
-
Testcase included:yes
Description
Function: org.geotools.data.shapefile.shp.JTSUtilities.reverseRing(LinearRing)
Line 181: Missing setOrdinate() function call
Current (incorrect):
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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++)
}
return gf.createLinearRing(csNew);
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Modified (correct):
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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++)
}
return gf.createLinearRing(csNew);
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Issue Links
- is depended upon by
-
UDIG-1615
Create Polygon Tool Validation Broken
-
Activity
| Attachment | reverse_ring.patch [ 47923 ] |
| Testcase included | yes | |
| Affects Version/s | 2.6.2 [ 16075 ] |
| Fix Version/s | 2.6.3 [ 16260 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | 2.6.2 [ 16075 ] | |
| Resolution | Fixed [ 1 ] |