Revision 42392 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.jts/src/main/java/org/gvsig/fmap/geom/jts/primitive/curve/line/BaseLine2DM.java
BaseLine2DM.java | ||
---|---|---|
78 | 78 |
*/ |
79 | 79 |
private void initializeCoordinates(Coordinate[] coordinates) { |
80 | 80 |
this.coordinates = new ArrayListCoordinateSequence(new ReadOnlyCoordinates(coordinates)); |
81 |
if(coordinates.length<1){ |
|
82 |
anyVertex = new Point2DM(0,0,0); |
|
83 |
} else { |
|
84 |
anyVertex = new Point2DM(coordinates[0].x, coordinates[0].y, coordinates[0].getOrdinate(CoordinateSequence.M)); |
|
85 |
} |
|
86 | 81 |
} |
87 | 82 |
|
88 | 83 |
|
... | ... | |
154 | 149 |
*/ |
155 | 150 |
public Point getVertex(int index) { |
156 | 151 |
Point2DM vertex = new Point2DM(this.coordinates.get(index)); |
157 |
anyVertex = vertex; |
|
158 | 152 |
return vertex; |
159 | 153 |
} |
160 | 154 |
|
Also available in: Unified diff