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/BaseLine3DM.java

View differences:

BaseLine3DM.java
71 71
     */
72 72
    private void initializeCoordinates(Coordinate[] coordinates) {
73 73
        this.coordinates = new ArrayListCoordinateSequence(new ReadOnlyCoordinates(coordinates));
74
        if(coordinates.length<1){
75
            anyVertex = new Point3DM(0,0,0,0);
76
        } else {
77
            Coordinate coordinate = coordinates[0];
78
            anyVertex = new Point3DM(coordinate.x, coordinate.y, coordinate.z, coordinate.getOrdinate(CoordinateSequence.M));
79
        }
80 74
    }
81 75

  
82 76
    /**
......
158 152
     */
159 153
    public Point getVertex(int index) {
160 154
        Point3DM vertex = new Point3DM(this.coordinates.get(index));
161
        anyVertex = vertex;
162 155
        return vertex;
163 156
    }
164 157
}

Also available in: Unified diff