Revision 47432 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/point/AbstractPoint.java
AbstractPoint.java | ||
---|---|---|
22 | 22 |
*/ |
23 | 23 |
package org.gvsig.fmap.geom.jts.primitive.point; |
24 | 24 |
|
25 |
import com.vividsolutions.jts.geom.CoordinateSequence; |
|
25 | 26 |
import java.awt.Shape; |
26 | 27 |
import java.awt.geom.AffineTransform; |
27 | 28 |
import java.awt.geom.PathIterator; |
... | ... | |
160 | 161 |
*/ |
161 | 162 |
public double[] getCoordinates() { |
162 | 163 |
double[] coords = new double[this.getDimension()]; |
163 |
for (int i = 0; i < this.getDimension(); i++) { |
|
164 |
coords[i] = this.coordinate.getOrdinate(i); |
|
164 |
coords[0] = getX(); |
|
165 |
coords[1] = getY(); |
|
166 |
if(this.getGeometryType().getSubType() == Geometry.SUBTYPES.GEOM2DM){ |
|
167 |
coords[2] = this.getCoordinateAt(CoordinateSequence.M); |
|
168 |
} else if(this.getGeometryType().getSubType() == Geometry.SUBTYPES.GEOM3D){ |
|
169 |
coords[2] = this.getCoordinateAt(CoordinateSequence.Z); |
|
170 |
} else if(this.getGeometryType().getSubType() == Geometry.SUBTYPES.GEOM3DM){ |
|
171 |
coords[2] = this.getCoordinateAt(CoordinateSequence.Z); |
|
172 |
coords[3] = this.getCoordinateAt(CoordinateSequence.M); |
|
165 | 173 |
} |
166 | 174 |
return coords; |
167 | 175 |
} |
... | ... | |
392 | 400 |
Point2D p = new Point2D(this.getProjection(), this.coordinate.x, this.coordinate.y); |
393 | 401 |
return p; |
394 | 402 |
} |
395 |
|
|
403 |
|
|
396 | 404 |
@Override |
397 | 405 |
public Geometry offset(int joinStyle, double distance) throws GeometryOperationNotSupportedException, GeometryOperationException { |
398 | 406 |
return offset(distance); |
Also available in: Unified diff