Revision 8659 trunk/extensions/extGraph_predes/src/com/iver/cit/gvsig/graph/core/writers/NetworkFileRedWriter.java

View differences:

NetworkFileRedWriter.java
63 63
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource;
64 64
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter;
65 65
import com.iver.cit.gvsig.graph.core.NodeGv;
66
import com.iver.cit.gvsig.util.SnappingCoordinateMap;
66 67
import com.iver.utiles.swing.threads.CancellableMonitorable;
67 68
import com.vividsolutions.jts.geom.Coordinate;
68 69
import com.vividsolutions.jts.geom.Geometry;
......
75 76
public class NetworkFileRedWriter extends AbstractNetworkWriter {
76 77
	File redFile;
77 78
	CancellableMonitorable cancel;
79
	private double snapTolerance = 0d;
78 80
	public NetworkFileRedWriter() {
79 81
		
80 82
		// Set up fields for table nodes
......
173 175
		// SE UTILIZA PARA LOS CALCULOS POR IDTRAMO Y
174 176
		// PORCENTAJE
175 177
		// PARA SABER SI EST? M?S CERCA DE UN NODO O DEL OTRO.
176

  
177
		Hashtable nodeHash = new Hashtable();
178
		Hashtable nodeHash = null;
179
		if(snapTolerance != 0d)
180
			nodeHash = new SnappingCoordinateMap(snapTolerance);
181
		else
182
			nodeHash = new Hashtable();
178 183
		ArrayList nodes = new ArrayList();
179 184

  
180 185
		try {
......
396 401

  
397 402
	}
398 403

  
404
	public void setSnapTolerance(double snapTolerance) {
405
		this.snapTolerance = snapTolerance;
406
	}
407

  
399 408
}

Also available in: Unified diff