Revision 129

View differences:

org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/core/GeoAlgorithm.java
1031 1031
            final String sFilename = getOutputFilename(out);
1032 1032
            if (sFilename == null) {
1033 1033
               ((FileOutputChannel) channel).setFilename(m_OutputFactory.getTempFilename(out));
1034
               ((FileOutputChannel) channel).setTemporary(true);
1034 1035
               return channel;
1035
            }
1036
            else {
1036
            } else {
1037 1037
               ((FileOutputChannel) channel).setFilename(sFilename);
1038
               ((FileOutputChannel) channel).setTemporary(false);
1038 1039
               return channel;
1039 1040
            }
1040 1041
         }
......
1225 1226
                                             final String[] sFields) throws UnsupportedOutputChannelException {
1226 1227

  
1227 1228
      final String sFilename = m_OutputFactory.getTempVectorLayerFilename();
1228
      final IOutputChannel channel = new FileOutputChannel(sFilename);
1229
      final IOutputChannel channel = new FileOutputChannel(sFilename, true);
1229 1230

  
1230 1231
      return m_OutputFactory.getNewVectorLayer("", iShapeType, types, sFields, channel, m_CRS);
1231

  
1232 1232
   }
1233 1233

  
1234 1234

  
......
1387 1387
                                             final int iBands) throws UnsupportedOutputChannelException {
1388 1388

  
1389 1389
      final String sFilename = m_OutputFactory.getTempRasterLayerFilename();
1390
      final IOutputChannel channel = new FileOutputChannel(sFilename);
1390
      final IOutputChannel channel = new FileOutputChannel(sFilename, true);
1391 1391

  
1392 1392
      final IRasterLayer newLayer = m_OutputFactory.getNewRasterLayer("", iDataType, extent, iBands, channel, m_CRS);
1393 1393

  
......
1402 1402
                                             final AnalysisExtent extent) throws UnsupportedOutputChannelException {
1403 1403

  
1404 1404
      final String sFilename = m_OutputFactory.getTempRasterLayerFilename();
1405
      final IOutputChannel channel = new FileOutputChannel(sFilename);
1405
      final IOutputChannel channel = new FileOutputChannel(sFilename, true);
1406 1406

  
1407 1407
      final IRasterLayer newLayer = m_OutputFactory.getNewRasterLayer("", iDataType, extent, 1, channel, m_CRS);
1408 1408

  
org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.core/src/main/java/es/unex/sextante/outputs/FileOutputChannel.java
5 5
            IOutputChannel {
6 6

  
7 7
   private String m_sFilename;
8
   private boolean temporary = false;
8 9

  
9

  
10
   public FileOutputChannel(final String sFilename, boolean temporary) {
11
     this.m_sFilename = sFilename;
12
     this.temporary = temporary;
13
   }
14
   
10 15
   public FileOutputChannel(final String sFilename) {
16
       this(sFilename,false);
17
   }
11 18

  
12
      m_sFilename = sFilename;
13

  
19
   public boolean isTemporary() {
20
       return this.temporary;
14 21
   }
15

  
16

  
22
   
23
   public void setTemporary(boolean temporary ) {
24
       this.temporary = temporary;
25
   }
26
   
17 27
   public String getAsCommandLineParameter() {
18 28

  
19 29
      if (m_sFilename == null) {

Also available in: Unified diff