Revision 764 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.vector/org.gvsig.view3d.vector.lib/org.gvsig.view3d.vector.lib.impl/src/main/java/org/gvsig/view3d/vector/lib/impl/extrusion/DefaultVectorExtrusionLoader.java
DefaultVectorExtrusionLoader.java | ||
---|---|---|
1 | 1 |
package org.gvsig.view3d.vector.lib.impl.extrusion; |
2 | 2 |
|
3 |
import org.gvsig.fmap.dal.exception.DataException; |
|
3 | 4 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
5 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
6 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
|
7 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
4 | 8 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
5 | 9 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
6 | 10 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
... | ... | |
38 | 42 |
if (layerVect.getLegend() instanceof IVectorLegend) { |
39 | 43 |
vectorLegend = (IVectorLegend) layerVect.getLegend(); |
40 | 44 |
} |
41 |
return new DefaultVectorExtrusionPointRenderableLayer((VectorExtrusionLoaderParameters) parameters, |
|
42 |
featureStore, vectorLegend); |
|
43 |
|
|
45 |
|
|
46 |
FeatureType featureType = null; |
|
47 |
try { |
|
48 |
featureType = featureStore.getDefaultFeatureType(); |
|
49 |
} catch (DataException e) { |
|
50 |
// TODO Auto-generated catch block |
|
51 |
throw new LoadException(null, e); |
|
52 |
} |
|
53 |
|
|
54 |
GeometryType geomType = featureType.getDefaultGeometryAttribute().getGeomType(); |
|
55 |
if(geomType.isTypeOf(TYPES.LINE) || geomType.isTypeOf(TYPES.MULTILINE)) { |
|
56 |
return new DefaultVectorExtrusionLineRenderableLayer((VectorExtrusionLoaderParameters) parameters, featureStore, vectorLegend); |
|
57 |
} else if(geomType.isTypeOf(TYPES.POINT) || geomType.isTypeOf(TYPES.MULTIPOINT)) { |
|
58 |
return new DefaultVectorExtrusionPointRenderableLayer((VectorExtrusionLoaderParameters) parameters, featureStore, vectorLegend); |
|
59 |
} else { |
|
60 |
return null; |
|
61 |
} |
|
44 | 62 |
} |
45 | 63 |
|
46 | 64 |
} |
Also available in: Unified diff