Revision 38412 branches/v2_0_0_prep/libraries/libFMap_dalfile/src/org/gvsig/fmap/dal/store/shp/utils/SHPMultiLine.java
SHPMultiLine.java | ||
---|---|---|
286 | 286 |
|
287 | 287 |
if (g.getGeometryType().isTypeOf(Geometry.TYPES.AGGREGATE)){ |
288 | 288 |
MultiPrimitive multiPrimitive = (MultiPrimitive)g; |
289 |
int index = 0; |
|
289 | 290 |
for (int i=0 ; i<multiPrimitive.getPrimitivesNumber() ; i++){ |
290 |
obtainsPoints(multiPrimitive.getPrimitiveAt(i), arrayPoints, arrayParts, arrayZs, is3D); |
|
291 |
obtainsPoints(multiPrimitive.getPrimitiveAt(i), arrayPoints, arrayParts, arrayZs, is3D, index); |
|
292 |
index += multiPrimitive.getPrimitiveAt(i).getGeneralPath().getNumCoords(); |
|
291 | 293 |
} |
292 | 294 |
}else{ |
293 |
obtainsPoints((Primitive)g, arrayPoints, arrayParts, arrayZs, is3D); |
|
295 |
obtainsPoints((Primitive)g, arrayPoints, arrayParts, arrayZs, is3D, 0);
|
|
294 | 296 |
} |
295 | 297 |
|
296 | 298 |
Integer[] integers = (Integer[]) arrayParts.toArray(new Integer[0]); |
... | ... | |
312 | 314 |
} |
313 | 315 |
} |
314 | 316 |
|
315 |
private void obtainsPoints(Primitive primitive, List arrayPoints, List arrayParts, List arrayZs, boolean is3D){
|
|
317 |
private void obtainsPoints(Primitive primitive, List arrayPoints, List arrayParts, List arrayZs, boolean is3D, int index) {
|
|
316 | 318 |
PathIterator theIterator = primitive.getPathIterator(null, geomManager.getFlatness()); |
317 | 319 |
double[] theData = new double[6]; |
318 | 320 |
java.awt.geom.Point2D pFirst = null; |
... | ... | |
327 | 329 |
case PathIterator.SEG_MOVETO: |
328 | 330 |
if (first) { |
329 | 331 |
first = false; |
330 |
arrayParts.add(new Integer(0));
|
|
332 |
arrayParts.add(new Integer(index));
|
|
331 | 333 |
} else { |
332 | 334 |
if (m_type==SHP.POLYGON2D || |
333 | 335 |
m_type==SHP.POLYGON3D || |
... | ... | |
397 | 399 |
} |
398 | 400 |
break; |
399 | 401 |
} //end switch |
402 |
index++; |
|
400 | 403 |
theIterator.next(); |
401 | 404 |
} |
402 | 405 |
} |
Also available in: Unified diff