Revision 8235 trunk/extensions/extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/impl/spatialjoin/SpatialJoinGeoprocessController.java
SpatialJoinGeoprocessController.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.4 2006-08-11 16:30:38 azabala |
|
48 |
* Revision 1.5 2006-10-23 10:29:18 caballero |
|
49 |
* ancho y alto del panel |
|
50 |
* |
|
51 |
* Revision 1.4 2006/08/11 16:30:38 azabala |
|
49 | 52 |
* *** empty log message *** |
50 | 53 |
* |
51 | 54 |
* Revision 1.3 2006/07/21 09:10:34 azabala |
... | ... | |
106 | 109 |
|
107 | 110 |
private SpatialJoinPanelIF geoProcessingSpatialjoinPanel; |
108 | 111 |
private SpatialJoinGeoprocess spatialJoin; |
109 |
|
|
112 |
|
|
110 | 113 |
public void setView(IGeoprocessPanel viewPanel) { |
111 |
this.geoProcessingSpatialjoinPanel =
|
|
114 |
this.geoProcessingSpatialjoinPanel = |
|
112 | 115 |
(SpatialJoinPanelIF) viewPanel; |
113 | 116 |
} |
114 | 117 |
public IGeoprocess getGeoprocess() { |
... | ... | |
155 | 158 |
return false; |
156 | 159 |
} |
157 | 160 |
} |
158 |
|
|
161 |
|
|
159 | 162 |
boolean onlyFirstSelection = geoProcessingSpatialjoinPanel |
160 | 163 |
.onlyFirstLayerSelected(); |
161 | 164 |
boolean onlySecondSelection = geoProcessingSpatialjoinPanel |
162 | 165 |
.onlySecondLayerSelected(); |
163 | 166 |
boolean nearest = geoProcessingSpatialjoinPanel.isNearestSelected(); |
164 |
|
|
165 |
|
|
167 |
|
|
168 |
|
|
166 | 169 |
SpatialJoinGeoprocess join = new SpatialJoinGeoprocess(inputLayer); |
167 | 170 |
join.setSecondOperand(secondLayer); |
168 | 171 |
join.setFields_sumFunctions(sumarizeFunctions); |
... | ... | |
174 | 177 |
params.put("secondlayerselection", second); |
175 | 178 |
if(! nearest){ |
176 | 179 |
if(!secondLayer.isSpatiallyIndexed()){ |
177 |
final IMonitorableTask sptIdxTask =
|
|
180 |
final IMonitorableTask sptIdxTask = |
|
178 | 181 |
geoProcessingSpatialjoinPanel. |
179 | 182 |
askForSpatialIndexCreation(secondLayer); |
180 | 183 |
if(sptIdxTask != null){ |
... | ... | |
182 | 185 |
new Runnable(){ |
183 | 186 |
public void run() { |
184 | 187 |
PluginServices. |
185 |
cancelableBackgroundExecution(sptIdxTask);
|
|
188 |
cancelableBackgroundExecution(sptIdxTask); |
|
186 | 189 |
}} |
187 | 190 |
); |
188 | 191 |
} //if |
189 | 192 |
}//if |
190 |
|
|
193 |
|
|
191 | 194 |
}//if nearest |
192 | 195 |
Boolean nearSel = new Boolean(nearest); |
193 | 196 |
params.put("nearest", nearSel); |
... | ... | |
196 | 199 |
IWriter writer = new ShpWriter(); |
197 | 200 |
join.setResultLayerProperties(writer, schemaManager); |
198 | 201 |
join.setParameters(params); |
199 |
SHPLayerDefinition definition =
|
|
202 |
SHPLayerDefinition definition = |
|
200 | 203 |
(SHPLayerDefinition) join.createLayerDefinition(); |
201 | 204 |
definition.setFile(outputFile); |
202 | 205 |
((ShpWriter)writer).setFile(definition.getFile()); |
... | ... | |
228 | 231 |
} |
229 | 232 |
return true; |
230 | 233 |
} |
234 |
public int getWidth() { |
|
235 |
return 700; |
|
236 |
} |
|
231 | 237 |
|
238 |
public int getHeight() { |
|
239 |
return 350; |
|
240 |
} |
|
232 | 241 |
} |
233 | 242 |
|
Also available in: Unified diff