Revision 40415
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/operation/fromwkb/WKBParser3.java | ||
---|---|---|
38 | 38 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
39 | 39 |
import org.gvsig.fmap.geom.aggregate.MultiPoint; |
40 | 40 |
import org.gvsig.fmap.geom.aggregate.MultiPrimitive; |
41 |
import org.gvsig.fmap.geom.aggregate.MultiSurface; |
|
41 | 42 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
42 | 43 |
import org.gvsig.fmap.geom.primitive.Curve; |
43 | 44 |
import org.gvsig.fmap.geom.primitive.OrientablePrimitive; |
... | ... | |
256 | 257 |
} |
257 | 258 |
} |
258 | 259 |
|
259 |
private Surface parseMultiPolygon(ByteBuffer data) |
|
260 |
private MultiSurface parseMultiPolygon(ByteBuffer data)
|
|
260 | 261 |
throws CreateGeometryException { |
261 | 262 |
int count = data.getInt(); |
262 |
|
|
263 |
|
|
264 |
if(count != 1) |
|
265 |
System.out.println("===>>" + count); |
|
266 |
|
|
263 | 267 |
int subType = getSubType(gHaveZ, gHaveM); |
264 |
Surface surface = (Surface)geomManager.create(TYPES.SURFACE, subType);
|
|
268 |
MultiSurface multiSurface = (MultiSurface)geomManager.create(TYPES.MULTISURFACE, subType);
|
|
265 | 269 |
|
266 | 270 |
Point point; |
267 | 271 |
for (int i = 0; i < count; i++) { |
272 |
Surface surface = (Surface)geomManager.create(TYPES.SURFACE, subType); |
|
268 | 273 |
parseTypeAndSRID(data); |
269 | 274 |
int countRings = data.getInt(); |
270 | 275 |
for (int j = 0; j < countRings; j++) { |
... | ... | |
290 | 295 |
} |
291 | 296 |
surface.closePrimitive(); |
292 | 297 |
} |
298 |
multiSurface.addSurface(surface); |
|
293 | 299 |
} |
294 |
return surface;
|
|
300 |
return multiSurface;
|
|
295 | 301 |
} |
296 | 302 |
|
297 | 303 |
private double[][] parsePointsAsDoubleArray(ByteBuffer data, boolean haveZ, |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryLibrary.java | ||
---|---|---|
171 | 171 |
geometryManager.registerGeometryType(Spline2DZ.class, "Spline3D", |
172 | 172 |
TYPES.SPLINE, SUBTYPES.GEOM3D, TYPES.CURVE, SUBTYPES.GEOM2D); |
173 | 173 |
|
174 |
//Register surfaces in 2D
|
|
174 |
//Register surfaces in 3D
|
|
175 | 175 |
geometryManager.registerGeometryType(Surface2DZ.class, "Surface3D", |
176 | 176 |
TYPES.SURFACE, SUBTYPES.GEOM3D, new int[0], new int[]{SUBTYPES.GEOM2D}); |
177 | 177 |
geometryManager.registerGeometryType(Circle2DZ.class, "Circle3D", |
Also available in: Unified diff