Revision 279 org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.xyshift/src/main/java/org/gvsig/geoprocess/algorithm/xyshift/XYShiftOperation.java
XYShiftOperation.java | ||
---|---|---|
139 | 139 |
* @return |
140 | 140 |
* @throws CreateGeometryException |
141 | 141 |
*/ |
142 |
@SuppressWarnings("deprecation") |
|
142 | 143 |
private Surface shiftSurface(Surface geom) throws CreateGeometryException { |
143 | 144 |
Surface surface = (Surface)geometryManager.create(Geometry.TYPES.SURFACE, geom.getGeometryType().getSubType()); |
144 | 145 |
GeneralPathX path = geom.getGeneralPath(); |
145 | 146 |
double[] coords = path.getPointCoords(); |
146 | 147 |
for (int i = 0; i < coords.length; i++) { |
147 |
if((coords[i] % 2) == 0)
|
|
148 |
if((i % 2) == 0)
|
|
148 | 149 |
coords[i] = coords[i] + x; |
149 | 150 |
else |
150 | 151 |
coords[i] = coords[i] + y; |
Also available in: Unified diff