svn-gvsig-desktop / trunk / libraries / libRaster / src-test / org / gvsig / raster / grid / GridInstanciationTest.java @ 21404
History | View | Annotate | Download (2.18 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*/
|
19 |
package org.gvsig.raster.grid; |
20 |
|
21 |
import junit.framework.TestCase; |
22 |
|
23 |
import org.gvsig.raster.RasterLibrary; |
24 |
import org.gvsig.raster.buffer.RasterBufferInvalidException; |
25 |
import org.gvsig.raster.dataset.IRasterDataSource; |
26 |
import org.gvsig.raster.dataset.MultiRasterDataset; |
27 |
import org.gvsig.raster.dataset.NotSupportedExtensionException; |
28 |
import org.gvsig.raster.dataset.io.RasterDriverException; |
29 |
import org.gvsig.raster.datastruct.Extent; |
30 |
|
31 |
/**
|
32 |
*
|
33 |
* 10/06/2008
|
34 |
* @author Nacho Brodin nachobrodin@gmail.com
|
35 |
*/
|
36 |
public class GridInstanciationTest extends TestCase { |
37 |
private String baseDir = "./test-images/"; |
38 |
private String path1 = baseDir + "miniRaster28x25F32.tif"; |
39 |
private IRasterDataSource f1 = null; |
40 |
private Grid grid = null; |
41 |
|
42 |
static{
|
43 |
RasterLibrary.wakeUp(); |
44 |
} |
45 |
|
46 |
public void start(){ |
47 |
this.setUp();
|
48 |
this.testStack();
|
49 |
} |
50 |
|
51 |
public void setUp() { |
52 |
System.err.println("GridInstanciationTest running..."); |
53 |
try {
|
54 |
f1 = MultiRasterDataset.open(null, path1);
|
55 |
Extent ext = f1.getExtent(); |
56 |
GridExtent windowExtent = new GridExtent(ext, f1.getCellSize());
|
57 |
grid = new Grid(f1, new int[]{0, 1, 2}, windowExtent); |
58 |
} catch (NotSupportedExtensionException e) {
|
59 |
e.printStackTrace(); |
60 |
} catch (RasterDriverException e) {
|
61 |
e.printStackTrace(); |
62 |
} catch (RasterBufferInvalidException e) {
|
63 |
e.printStackTrace(); |
64 |
} |
65 |
} |
66 |
|
67 |
public void testStack() { |
68 |
|
69 |
} |
70 |
} |