Revision 7586

View differences:

branches/v10/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/drivers/wfs/WFSFeaturesIterator.java
62 62
 *
63 63
 * $Id$
64 64
 * $Log$
65
 * Revision 1.1.2.1  2006-09-19 12:28:32  jorpiell
65
 * Revision 1.1.2.2  2006-09-26 07:36:23  jorpiell
66
 * El WFS no reproyectaba porque no se le asignaba a la capa un sistema de referencia. Ahora ya se hace.
67
 *
68
 * Revision 1.1.2.1  2006/09/19 12:28:32  jorpiell
66 69
 * Ya no se depende de geotools
67 70
 *
68 71
 * Revision 1.1  2006/09/18 12:07:31  jorpiell
......
105 108
	private IGMLFeaturesIterator iterator = null;
106 109
	
107 110
	public WFSFeaturesIterator(IGMLFeaturesIterator iterator,String sProjection){
108
		this.iterator = iterator;
109
		if (sProjection != null){
110
			View activeView = 
111
				(View)PluginServices.getMDIManager().getActiveWindow();
112
			
113
			IProjection featureProjection = ProjectionPool.get(sProjection);
114
			IProjection layerProjection = activeView.getMapControl().getViewPort().getProjection();
115
			
116
			if (!(featureProjection.equals(layerProjection))){
117
				coordTrans = featureProjection.getCT(layerProjection);
118
							
119
				JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),
120
				 	PluginServices.getText(this,"reproyectar_aviso"));	
121
			}
122
		}
111
		this.iterator = iterator;		
123 112
	}
124 113

  
125 114
	public boolean hasNext() throws DriverException {
branches/v10/extensions/extWFS2/src/com/iver/cit/gvsig/fmap/layers/FLyrWFS.java
70 70
 *
71 71
 * $Id$
72 72
 * $Log$
73
 * Revision 1.10  2006-09-05 15:41:52  jorpiell
73
 * Revision 1.10.2.1  2006-09-26 07:36:24  jorpiell
74
 * El WFS no reproyectaba porque no se le asignaba a la capa un sistema de referencia. Ahora ya se hace.
75
 *
76
 * Revision 1.10  2006/09/05 15:41:52  jorpiell
74 77
 * A?adida la funcionalidad de cargar WFS desde el cat?logo
75 78
 *
76 79
 * Revision 1.9  2006/07/05 12:05:41  jorpiell
......
117 120
    private WFSAttribute[] fields = null;
118 121
    private int numfeatures = 100;
119 122
    private int timeout = 10000;
123
    private String srs = null;
120 124
    private FMapWFSDriver wfsDriver = null;
121 125
    private VectorialAdapter vectorialAdapter = null;
122 126
    private WFSLayerNode wfsLayerNode = null;
......
179 183
    public void load() throws DriverIOException{
180 184
    	WFSAdapter adapter = new WFSAdapter();
181 185
    	try {
186
    		setProjection(ProjectionPool.get(getWFSStatus().getSrs()));
182 187
    		wfsDriver.getFeature(getWFSStatus());
183 188

  
184 189
    		adapter.setDriver((VectorialDriver) wfsDriver);
......
205 210
    	status.setTimeout(getTimeout());
206 211
    	status.setFields(getFieldNames());
207 212
    	status.setOnlineResource(getOnlineResource());
213
    	status.setSrs(getSrs());
208 214
	   	return status;
209 215
    }
210 216

  
......
432 438
	public boolean isPropertiesMenuVisible(){
433 439
		return false;
434 440
	}
441

  
442
	public String getSrs() {
443
		return srs;
444
	}
445

  
446
	public void setSrs(String srs) {
447
		this.srs = srs;
448
	}
435 449
}
branches/v10/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSParamsPanel.java
62 62
 *
63 63
 * $Id$
64 64
 * $Log$
65
 * Revision 1.10  2006-07-21 11:50:31  jaume
65
 * Revision 1.10.2.1  2006-09-26 07:36:24  jorpiell
66
 * El WFS no reproyectaba porque no se le asignaba a la capa un sistema de referencia. Ahora ya se hace.
67
 *
68
 * Revision 1.10  2006/07/21 11:50:31  jaume
66 69
 * improved appearance
67 70
 *
68 71
 * Revision 1.9  2006/06/21 12:35:45  jorpiell
......
457 460
		layer.setPassword(getOptionsPanel().getPassword());
458 461
		layer.setNumfeatures(getOptionsPanel().getBuffer());
459 462
		layer.setTimeout(getOptionsPanel().getTimeout());
463
		layer.setSrs(getOptionsPanel().getSRS());
460 464
		layer.setWfsDriver(data.getDriver());
461 465
		return layer;
462 466
	}
branches/v10/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSOptionsPanel.java
62 62
 *
63 63
 * $Id$
64 64
 * $Log$
65
 * Revision 1.9  2006-09-05 14:25:05  jorpiell
65
 * Revision 1.9.2.1  2006-09-26 07:36:24  jorpiell
66
 * El WFS no reproyectaba porque no se le asignaba a la capa un sistema de referencia. Ahora ya se hace.
67
 *
68
 * Revision 1.9  2006/09/05 14:25:05  jorpiell
66 69
 * Eliminado el nombre de usuario y la contrase?a del panel de opciones
67 70
 *
68 71
 * Revision 1.8  2006/07/21 11:50:31  jaume
......
280 283
			return 10000;
281 284
		}
282 285
	}
286
	
287
	/**
288
	 * Gets the SRS
289
	 * @return
290
	 */
291
	public String getSRS(){
292
		return getSrsText().getText();
293
	}
283 294

  
284 295
	/**
285 296
	 * This method initializes formatPanel

Also available in: Unified diff