Revision 4181 org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/raster/process/OverviewsProcess.java

View differences:

OverviewsProcess.java
2 2
*
3 3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4 4
* of the Valencian Government (CIT)
5
* 
5
*
6 6
* This program is free software; you can redistribute it and/or
7 7
* modify it under the terms of the GNU General Public License
8 8
* as published by the Free Software Foundation; either version 2
9 9
* of the License, or (at your option) any later version.
10
* 
10
*
11 11
* This program is distributed in the hope that it will be useful,
12 12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13 13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 14
* GNU General Public License for more details.
15
* 
15
*
16 16
* You should have received a copy of the GNU General Public License
17 17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 19
* MA  02110-1301, USA.
20
* 
20
*
21 21
*/
22 22
package org.gvsig.raster.tools.app.basic.raster.process;
23 23

  
24
import java.net.URI;
25

  
24 26
import org.gvsig.andami.PluginServices;
25 27
import org.gvsig.fmap.dal.coverage.RasterLocator;
26 28
import org.gvsig.fmap.dal.coverage.exception.OverviewException;
......
42 44
	private int          resamplingAlg = OverviewBuilder.AVERAGE;
43 45
	private int[]        overviews     = new int[] { 2, 4, 8, 16 };
44 46
	private String       builder       = "GDAL";
45
	
47

  
46 48
	/*
47 49
	 * (non-Javadoc)
48 50
	 * @see org.gvsig.rastertools.RasterProcess#init()
......
69 71
	/**
70 72
	 * M?todo donde se ejecutar? el Thread, aqu? se generaran las
71 73
	 * overviews
72
	 * @throws ProcessException 
74
	 * @throws ProcessException
73 75
	 */
74 76
	public void process() throws ProcessException {
75 77
		insertLineLog(PluginServices.getText(this, "overviews_generating"));
76 78
		OverviewBuilder overviewBuilder = RasterLocator.getManager().getOverviewBuilder(builder);
77
		
79

  
78 80
		overviewBuilder.setIncrementListener(this);
79 81
		try {
80
			String[] uri = rasterSE.getDataStore().getURIByProvider();
82
			URI[] uri = rasterSE.getDataStore().getURIByProvider();
81 83

  
82 84
			for (int i = 0; i < uri.length; i++) {
83 85
				insertLineLog(" Dataset: " + i);
84
				overviewBuilder.buildOverviews(resamplingAlg, uri[i], overviews);
86
				overviewBuilder.buildOverviews(resamplingAlg, uri[i].getPath(), overviews);
85 87
			}
86 88

  
87 89
			if (externalActions != null)
......
116 118
	public String getTitle() {
117 119
		return PluginServices.getText(this, "incremento_overview");
118 120
	}
119
	
121

  
120 122
	/*
121 123
	 * (non-Javadoc)
122 124
	 * @see java.lang.Object#finalize()

Also available in: Unified diff