Revision 23803 branches/v2_0_0_prep/libraries/libFMap_spatialindex/src/org/gvsig/fmap/data/index/spatial/jsi/PersistentRTreeJsi.java

View differences:

PersistentRTreeJsi.java
68 68
import javax.imageio.stream.FileImageOutputStream;
69 69

  
70 70
import org.gvsig.fmap.data.index.IndexException;
71
import org.gvsig.fmap.data.index.IndexParameters;
71 72
import org.gvsig.fmap.data.index.spatial.PersistentSpatialIndex;
72 73
import org.gvsig.fmap.geom.primitive.Envelope;
73 74

  
......
116 117
	 * Constructor
117 118
	 * @param file path of the spatial index file
118 119
	 * @throws IndexException 
119
	 */
120
	public PersistentRTreeJsi(String file, boolean overwrite) throws IndexException {
120
	 */	
121
	public PersistentRTreeJsi(IndexParameters params) throws IndexException {
122
		super(params);
121 123
		rtree = new RTree();
122 124
		Properties props = new Properties();
123 125
		rtree.init(props);
124
		rtreeFile = new File(file + rExt);
126
		rtreeFile = new File(getName() + rExt);
125 127
		rectangles = new LinkedHashMap();
126
		if(! overwrite)
128
		if(!params.isOverwrite()) {
127 129
			load();
130
		}
131
		
128 132
	}
129 133
	
130 134
	public void flush(File f) throws IndexException {

Also available in: Unified diff