Revision 1259 org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.algorithm/org.gvsig.geoprocess.algorithm.dissolve/src/main/java/org/gvsig/geoprocess/algorithm/dissolve/DissolveParametersPanel.java
DissolveParametersPanel.java | ||
---|---|---|
58 | 58 |
import es.unex.sextante.gui.algorithm.OutputChannelSelectionPanel; |
59 | 59 |
import es.unex.sextante.gui.core.SextanteGUI; |
60 | 60 |
import es.unex.sextante.outputs.Output; |
61 |
import java.util.Arrays; |
|
61 | 62 |
|
62 | 63 |
/** |
63 | 64 |
* Panel for dissolve algorithm |
... | ... | |
385 | 386 |
*/ |
386 | 387 |
public List<String> getFieldList() { |
387 | 388 |
IVectorLayer layer = getSelectedVectorLayer(); |
388 |
String geometryAttrName = "GEOMETRY"; |
|
389 |
if(layer instanceof FlyrVectIVectorLayer) { |
|
390 |
FeatureStore featStore = ((FlyrVectIVectorLayer)layer).getFeatureStore(); |
|
391 |
try { |
|
392 |
geometryAttrName = featStore.getDefaultFeatureType().getDefaultGeometryAttributeName(); |
|
393 |
} catch (DataException e) { |
|
394 |
//Se usa el nombre por defecto |
|
395 |
} |
|
396 |
} |
|
397 |
List<String> data = new ArrayList<String>(); |
|
398 |
for (int i = 0; i < layer.getFieldCount(); i++) { |
|
399 |
if(!layer.getFieldName(i).equals(geometryAttrName)) |
|
400 |
data.add(layer.getFieldName(i)); |
|
401 |
} |
|
402 |
return data; |
|
389 |
return Arrays.asList(layer.getFieldNames()); |
|
403 | 390 |
} |
404 | 391 |
} |
Also available in: Unified diff