Revision 268 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

View differences:

DALFeaturePersister.java
49 49

  
50 50
import com.vividsolutions.jts.geom.Geometry;
51 51
import com.vividsolutions.jts.geom.GeometryCollection;
52
import com.vividsolutions.jts.geom.MultiLineString;
53
import com.vividsolutions.jts.geom.MultiPolygon;
52 54

  
53 55
import es.unex.sextante.core.Sextante;
54 56

  
......
155 157
	}
156 158
	
157 159
	/**
158
	 * Converts a geometry collection from JTS to a list of geometries of the selected type. 
160
	 * Converts a geometry collection from JTS to a list of geometries of the selected type.
161
	 * The GeometryCollection is converted only when it is a heterogeneous collection of geometries 
159 162
	 * @param col
160 163
	 * @param type
161 164
	 * @return
......
164 167
	 * @throws GeometryOperationNotSupportedException 
165 168
	 */
166 169
	public ArrayList<org.gvsig.fmap.geom.Geometry> convertGeometryCollection2GeometryList(Geometry g, int type) throws GeometryOperationNotSupportedException, GeometryOperationException {
167
		if(g instanceof GeometryCollection) {
170
		if( g instanceof GeometryCollection && 
171
			!(g instanceof com.vividsolutions.jts.geom.MultiLineString) && 
172
			!(g instanceof com.vividsolutions.jts.geom.MultiPoint) && 
173
			!(g instanceof com.vividsolutions.jts.geom.MultiPolygon)) {
168 174
			GeometryCollection col = (GeometryCollection)g;
169 175
			ArrayList<org.gvsig.fmap.geom.Geometry> geometries = new ArrayList<org.gvsig.fmap.geom.Geometry>();
170 176
			

Also available in: Unified diff