Revision 994
org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.intersection/src/main/java/org/gvsig/geoprocess/algorithm/intersection/IntersectionOperation.java | ||
---|---|---|
202 | 202 |
} |
203 | 203 |
|
204 | 204 |
private boolean typesMatch(int dalType, Geometry newGeom) { |
205 |
|
|
205 | 206 |
return |
206 |
((dalType == TYPES.MULTICURVE &&
|
|
207 |
((geomManager.isSubtype(TYPES.MULTICURVE, dalType) &&
|
|
207 | 208 |
(newGeom instanceof MultiLineString || newGeom instanceof LineString)) || |
208 |
(dalType == TYPES.MULTIPOINT &&
|
|
209 |
(geomManager.isSubtype(TYPES.MULTIPOINT, dalType) &&
|
|
209 | 210 |
(newGeom instanceof MultiPoint || newGeom instanceof Point)) || |
210 |
(dalType == TYPES.MULTISURFACE &&
|
|
211 |
(geomManager.isSubtype(TYPES.MULTISURFACE, dalType) &&
|
|
211 | 212 |
(newGeom instanceof Polygon || newGeom instanceof MultiPolygon)) || |
212 |
(dalType == TYPES.CURVE && newGeom instanceof LineString) ||
|
|
213 |
(dalType == TYPES.SURFACE && newGeom instanceof Polygon) ||
|
|
214 |
(dalType == TYPES.POINT && newGeom instanceof Point));
|
|
213 |
(geomManager.isSubtype(TYPES.CURVE, dalType) && newGeom instanceof LineString) ||
|
|
214 |
(geomManager.isSubtype(TYPES.SURFACE, dalType) && newGeom instanceof Polygon) ||
|
|
215 |
(geomManager.isSubtype(TYPES.POINT, dalType) && newGeom instanceof Point));
|
|
215 | 216 |
|
216 | 217 |
} |
217 | 218 |
|
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 | ||
---|---|---|
384 | 384 |
private boolean acceptType(FeatureStore store, org.gvsig.fmap.geom.Geometry geom) throws ReadException { |
385 | 385 |
int fType = getShapeType(store); |
386 | 386 |
GeometryType geomType = geom.getGeometryType(); |
387 |
GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
|
387 | 388 |
|
388 | 389 |
if(geomType.isTypeOf(fType)) |
389 | 390 |
return true; |
390 |
if( fType == org.gvsig.fmap.geom.Geometry.TYPES.MULTICURVE && |
|
391 |
|
|
392 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTICURVE, fType) && |
|
391 | 393 |
geomType.isTypeOf(org.gvsig.fmap.geom.Geometry.TYPES.CURVE)) |
392 | 394 |
return true; |
393 |
if( fType == org.gvsig.fmap.geom.Geometry.TYPES.MULTISURFACE &&
|
|
395 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTISURFACE, fType) &&
|
|
394 | 396 |
geomType.isTypeOf(org.gvsig.fmap.geom.Geometry.TYPES.SURFACE)) |
395 | 397 |
return true; |
396 |
if( fType == org.gvsig.fmap.geom.Geometry.TYPES.MULTIPOINT &&
|
|
398 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTIPOINT, fType) &&
|
|
397 | 399 |
geomType.isTypeOf(org.gvsig.fmap.geom.Geometry.TYPES.POINT)) |
398 | 400 |
return true; |
399 |
if( fType == org.gvsig.fmap.geom.Geometry.TYPES.MULTISOLID &&
|
|
401 |
if( geomManager.isSubtype(org.gvsig.fmap.geom.Geometry.TYPES.MULTISOLID, fType) &&
|
|
400 | 402 |
geomType.isTypeOf(org.gvsig.fmap.geom.Geometry.TYPES.SOLID)) |
401 | 403 |
return true; |
402 | 404 |
return false; |
Also available in: Unified diff