Revision 41159 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.impl/src/main/java/org/gvsig/fmap/geom/util/Converter.java
Converter.java | ||
---|---|---|
134 | 134 |
|
135 | 135 |
if (geo instanceof MultiPolygon) { |
136 | 136 |
/* |
137 |
* A loop is not needed here because manager
|
|
138 |
* correctly creates and appends a primitive (surface)
|
|
139 |
* each time there is a move_to in the GeneralPathX
|
|
137 |
* We need a loop because a global path would not
|
|
138 |
* differentiate between move-to inside a polygon (holes)
|
|
139 |
* and move-to from one polygon to another
|
|
140 | 140 |
*/ |
141 |
shpNew = geomManager.createMultiSurface(toShape((MultiPolygon) geo), SUBTYPES.GEOM2D); |
|
141 |
MultiSurface msu = geomManager.createMultiSurface(SUBTYPES.GEOM2D); |
|
142 |
MultiPolygon mpo = (MultiPolygon) geo; |
|
143 |
Surface itemsu = null; |
|
144 |
int npo = mpo.getNumGeometries(); |
|
145 |
for (int i=0; i<npo; i++) { |
|
146 |
itemsu = geomManager.createSurface( |
|
147 |
toShape((Polygon) mpo.getGeometryN(i)), SUBTYPES.GEOM2D); |
|
148 |
msu.addPrimitive(itemsu); |
|
149 |
} |
|
150 |
shpNew = msu; |
|
142 | 151 |
} |
143 | 152 |
|
144 | 153 |
if (geo instanceof LineString) { |
Also available in: Unified diff