Revision 42267 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/Line3DM.java
Line3DM.java | ||
---|---|---|
22 | 22 |
*/ |
23 | 23 |
package org.gvsig.fmap.geom.jts.primitive.curve.line; |
24 | 24 |
|
25 |
import java.awt.Rectangle; |
|
26 |
import java.awt.Shape; |
|
27 |
import java.awt.geom.AffineTransform; |
|
28 |
import java.awt.geom.PathIterator; |
|
29 |
import java.awt.geom.Rectangle2D; |
|
30 |
|
|
31 | 25 |
import com.vividsolutions.jts.geom.Coordinate; |
26 |
import com.vividsolutions.jts.geom.CoordinateSequence; |
|
32 | 27 |
|
33 |
import org.cresques.cts.ICoordTrans; |
|
34 |
|
|
35 | 28 |
import org.gvsig.fmap.geom.Geometry; |
36 |
import org.gvsig.fmap.geom.handler.Handler;
|
|
37 |
import org.gvsig.fmap.geom.jts.primitive.point.Point2DM;
|
|
29 |
import org.gvsig.fmap.geom.jts.gputils.DefaultGeneralPathX;
|
|
30 |
import org.gvsig.fmap.geom.jts.primitive.point.Point2D; |
|
38 | 31 |
import org.gvsig.fmap.geom.jts.primitive.point.Point3D; |
39 | 32 |
import org.gvsig.fmap.geom.jts.primitive.point.Point3DM; |
40 |
import org.gvsig.fmap.geom.jts.utils.ArrayListCoordinateSequence; |
|
41 |
import org.gvsig.fmap.geom.jts.utils.ReadOnlyCoordinates; |
|
42 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
43 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
44 |
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
|
45 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
33 |
import org.gvsig.fmap.geom.jts.util.ArrayListCoordinateSequence; |
|
34 |
import org.gvsig.fmap.geom.jts.util.ReadOnlyCoordinates; |
|
46 | 35 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
47 | 36 |
import org.gvsig.fmap.geom.primitive.Point; |
48 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
49 | 37 |
|
50 | 38 |
|
51 | 39 |
/** |
... | ... | |
72 | 60 |
public Line3DM(Coordinate[] coordinates) { |
73 | 61 |
this(); |
74 | 62 |
this.coordinates = new ArrayListCoordinateSequence(new ReadOnlyCoordinates(coordinates)); |
75 |
vertex = new Point3DM(this.coordinates.get(0)); |
|
63 |
if(coordinates.length<1){ |
|
64 |
anyVertex = new Point3DM(0,0,0,0); |
|
65 |
} else { |
|
66 |
Coordinate coordinate = coordinates[0]; |
|
67 |
anyVertex = new Point3DM(coordinate.x, coordinate.y, coordinate.z, coordinate.getOrdinate(CoordinateSequence.M)); |
|
68 |
} |
|
69 |
|
|
76 | 70 |
} |
77 | 71 |
|
78 | 72 |
|
... | ... | |
113 | 107 |
} |
114 | 108 |
|
115 | 109 |
|
110 |
/* |
|
111 |
* (non-Javadoc) |
|
112 |
* |
|
113 |
* @see org.gvsig.fmap.geom.Geometry#getGeneralPath() |
|
114 |
*/ |
|
115 |
public GeneralPathX getGeneralPath() { |
|
116 |
return new DefaultGeneralPathX(new LineIterator(null),true,((Point3D)anyVertex).getZ()); |
|
117 |
} |
|
116 | 118 |
} |
Also available in: Unified diff