Revision 1191
org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.base/src/main/java/org/gvsig/geoprocess/algorithm/base/core/DALFeaturePersister.java | ||
---|---|---|
387 | 387 |
GeometryType geomType = geom.getGeometryType(); |
388 | 388 |
GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
389 | 389 |
|
390 |
if(geomType.isTypeOf(fType))
|
|
390 |
if(geomManager.isSubtype(fType, geomType.getType()))
|
|
391 | 391 |
return true; |
392 |
|
|
392 |
|
|
393 | 393 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTICURVE, fType) && |
394 |
geomType.isTypeOf(org.gvsig.fmap.geom.Geometry.TYPES.CURVE))
|
|
394 |
geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.CURVE, geomType.getType()))
|
|
395 | 395 |
return true; |
396 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTISURFACE, fType) &&
|
|
397 |
geomType.isTypeOf(org.gvsig.fmap.geom.Geometry.TYPES.SURFACE))
|
|
398 |
return true; |
|
396 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTISURFACE, fType) &&
|
|
397 |
geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.SURFACE, geomType.getType()) )
|
|
398 |
return true;
|
|
399 | 399 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTIPOINT, fType) && |
400 |
geomType.isTypeOf(org.gvsig.fmap.geom.Geometry.TYPES.POINT))
|
|
400 |
geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.POINT, geomType.getType()))
|
|
401 | 401 |
return true; |
402 | 402 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTISOLID, fType) && |
403 |
geomType.isTypeOf(org.gvsig.fmap.geom.Geometry.TYPES.SOLID))
|
|
404 |
return true;
|
|
403 |
geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.SOLID, geomType.getType()))
|
|
404 |
return true; |
|
405 | 405 |
return false; |
406 | 406 |
} |
407 | 407 |
|
org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.difference/src/main/java/org/gvsig/geoprocess/algorithm/difference/DifferenceAlgorithm.java | ||
---|---|---|
118 | 118 |
|
119 | 119 |
if (isPolygon(storeLayer) || isUndefined(storeLayer)) { |
120 | 120 |
FeatureStore outFeatStore = |
121 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_POLYGON, |
|
121 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_MULTIPOLYGON,
|
|
122 | 122 |
getTranslation("Difference_polygon"), RESULT_POL); |
123 | 123 |
|
124 | 124 |
operation.computesGeometryOperation(storeLayer, outFeatStore, |
125 | 125 |
attrNames, selectedGeomInput, selectedGeomOutput, true); |
126 | 126 |
} else { |
127 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_POLYGON, |
|
127 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_MULTIPOLYGON,
|
|
128 | 128 |
getTranslation("Null_polygon"), RESULT_POL); |
129 | 129 |
} |
130 | 130 |
|
131 | 131 |
if (isLine(storeLayer) || isUndefined(storeLayer)) { |
132 | 132 |
FeatureStore outFeatStore = |
133 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_LINE, |
|
133 |
buildOutPutStore(featureType, IVectorLayer.SHAPE_TYPE_MULTILINE,
|
|
134 | 134 |
getTranslation("Difference_line"), RESULT_LINE); |
135 | 135 |
|
136 | 136 |
operation.computesGeometryOperation(storeLayer, outFeatStore, |
137 | 137 |
attrNames, selectedGeomInput, selectedGeomOutput, true); |
138 | 138 |
} else { |
139 |
buildOutPutStore(featureType.getCopy(), IVectorLayer.SHAPE_TYPE_LINE, |
|
139 |
buildOutPutStore(featureType.getCopy(), IVectorLayer.SHAPE_TYPE_MULTILINE,
|
|
140 | 140 |
getTranslation("Null_line"), RESULT_LINE); |
141 | 141 |
} |
142 | 142 |
|
Also available in: Unified diff