Revision 5628 trunk/extensions/extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/spatialjoin/fmap/NearestSpatialJoinVisitor.java

View differences:

NearestSpatialJoinVisitor.java
45 45
 *
46 46
 * $Id$
47 47
 * $Log$
48
 * Revision 1.1  2006-05-24 21:09:47  azabala
48
 * Revision 1.2  2006-06-02 18:21:28  azabala
49
 * *** empty log message ***
50
 *
51
 * Revision 1.1  2006/05/24 21:09:47  azabala
49 52
 * primera version en cvs despues de refactoring orientado a crear un framework extensible de geoprocessing
50 53
 *
51 54
 * Revision 1.6  2006/05/01 19:08:41  azabala
......
173 176
	 * target layer and taking attributes from it
174 177
	 */
175 178
	public void visit(IGeometry g, int sourceIndex) throws VisitException {
179
		if(g == null)
180
			return;
181
long t0 = System.currentTimeMillis();		
176 182
		lookForNearestVisitor.setQueryGeometry(g.toJTSGeometry());
177 183
		try {
178 184
			if(onlySecondLayerSelection)
......
180 186
			else
181 187
				strategy.process(lookForNearestVisitor);
182 188
			int targetIndex = lookForNearestVisitor.getNearestFeatureIndex();
189
long t1 = System.currentTimeMillis();
183 190
			IFeature joinedFeature = createFeature(g, sourceIndex, targetIndex);
191
long t2 = System.currentTimeMillis();			
184 192
			this.featureProcessor.processFeature(joinedFeature);
193
long t3 = System.currentTimeMillis();
194
System.out.println((t1-t0)+" en buscar nearest");
195
System.out.println((t2-t1)+" en build feature");
196
System.out.println((t3-t2)+" en guardar feature");
185 197
		} catch (DriverException e) {
186 198
			throw new VisitException(
187 199
					"Problemas accediendo a los datos durante un nearest spatial join");

Also available in: Unified diff