Revision 7721 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/drivers/wfs/WFSFeaturesIterator.java

View differences:

WFSFeaturesIterator.java
6 6

  
7 7
import org.cresques.cts.ICoordTrans;
8 8
import org.cresques.cts.IProjection;
9
import org.cresques.cts.ProjectionPool;
9 10
import org.gvsig.remoteClient.gml.GMLException;
10 11
import org.gvsig.remoteClient.gml.IGMLFeaturesIterator;
11 12

  
12 13
import com.iver.andami.PluginServices;
13 14
import com.iver.cit.gvsig.fmap.DriverException;
14 15
import com.iver.cit.gvsig.fmap.core.IFeature;
15
import com.iver.cit.gvsig.fmap.crs.CRSFactory;
16 16
import com.iver.cit.gvsig.fmap.drivers.IFeatureIterator;
17 17
import com.iver.cit.gvsig.fmap.drivers.gml.FMAPGeometryFactory.FeatureWithAttributes;
18 18

  
......
61 61
 *
62 62
 * $Id$
63 63
 * $Log$
64
 * Revision 1.2  2006-09-25 10:22:18  caballero
65
 * Projection
64
 * Revision 1.3  2006-10-02 09:09:45  jorpiell
65
 * Cambios del 10 copiados al head
66 66
 *
67
 * Revision 1.1.2.2  2006/09/26 07:36:23  jorpiell
68
 * El WFS no reproyectaba porque no se le asignaba a la capa un sistema de referencia. Ahora ya se hace.
69
 *
70
 * Revision 1.1.2.1  2006/09/19 12:28:32  jorpiell
71
 * Ya no se depende de geotools
72
 *
67 73
 * Revision 1.1  2006/09/18 12:07:31  jorpiell
68 74
 * Se ha sustituido geotools por el driver de remoteservices
69 75
 *
......
100 106
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
101 107
 */
102 108
public class WFSFeaturesIterator implements IFeatureIterator{
103
	private ICoordTrans coordTrans = null;
109
	private ICoordTrans coordTrans = null;	
104 110
	private IGMLFeaturesIterator iterator = null;
105

  
111
	
106 112
	public WFSFeaturesIterator(IGMLFeaturesIterator iterator,String sProjection){
107
		this.iterator = iterator;
108
		if (sProjection != null){
109
			com.iver.cit.gvsig.project.documents.view.gui.View activeView =
110
				(com.iver.cit.gvsig.project.documents.view.gui.View) PluginServices.getMDIManager().getActiveWindow();
111

  
112
			IProjection featureProjection = CRSFactory.getCRS(sProjection);
113
			IProjection layerProjection = activeView.getMapControl().getViewPort().getProjection();
114

  
115
			if (!(featureProjection.equals(layerProjection))){
116
				coordTrans = featureProjection.getCT(layerProjection);
117

  
118
				JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),
119
				 	PluginServices.getText(this,"reproyectar_aviso"));
120
			}
121
		}
113
		this.iterator = iterator;		
122 114
	}
123 115

  
124 116
	public boolean hasNext() throws DriverException {
......
139 131
	}
140 132

  
141 133
	public void closeIterator() throws DriverException {
142

  
143
	}
144

  
145

  
134
				
135
	}	
136
	
137
	
146 138
}

Also available in: Unified diff