root / trunk / libraries / libRaster / src-test / org / gvsig / raster / dataset / io / rmf / TestRmfRead.java @ 11336
History | View | Annotate | Download (2.21 KB)
1 | 11336 | nacho | /*
|
---|---|---|---|
2 | * Created on 9-ago-2006
|
||
3 | *
|
||
4 | * To change the template for this generated file go to
|
||
5 | * Window>Preferences>Java>Code Generation>Code and Comments
|
||
6 | */
|
||
7 | /* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
||
8 | *
|
||
9 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
10 | *
|
||
11 | * This program is free software; you can redistribute it and/or
|
||
12 | * modify it under the terms of the GNU General Public License
|
||
13 | * as published by the Free Software Foundation; either version 2
|
||
14 | * of the License, or (at your option) any later version.
|
||
15 | *
|
||
16 | * This program is distributed in the hope that it will be useful,
|
||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
19 | * GNU General Public License for more details.
|
||
20 | *
|
||
21 | * You should have received a copy of the GNU General Public License
|
||
22 | * along with this program; if not, write to the Free Software
|
||
23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
24 | */
|
||
25 | package org.gvsig.raster.dataset.io.rmf; |
||
26 | |||
27 | import java.io.FileNotFoundException; |
||
28 | import java.io.IOException; |
||
29 | |||
30 | import junit.framework.TestCase; |
||
31 | |||
32 | import org.gvsig.raster.RasterLibrary; |
||
33 | import org.gvsig.raster.buffer.BufferFactory; |
||
34 | import org.gvsig.raster.dataset.FileNotOpenException; |
||
35 | import org.gvsig.raster.dataset.NotSupportedExtensionException; |
||
36 | import org.gvsig.raster.dataset.RasterDataset; |
||
37 | import org.gvsig.raster.dataset.RasterDriverException; |
||
38 | import org.gvsig.raster.dataset.properties.HistogramRmfSerializer; |
||
39 | import org.gvsig.raster.util.Histogram; |
||
40 | |||
41 | /**
|
||
42 | *
|
||
43 | * @author Nacho Brodin (nachobrodin@gmail.com)
|
||
44 | *
|
||
45 | */
|
||
46 | public class TestRmfRead extends TestCase { |
||
47 | |||
48 | private RmfBlocksManager manager = null; |
||
49 | private Histogram histogram = null; |
||
50 | |||
51 | static {
|
||
52 | RasterLibrary.wakeUp(); |
||
53 | } |
||
54 | |||
55 | public void start() { |
||
56 | this.setUp();
|
||
57 | this.testStack();
|
||
58 | } |
||
59 | |||
60 | public void setUp() { |
||
61 | System.err.println("TestRmfRead running..."); |
||
62 | } |
||
63 | |||
64 | public void testStack(){ |
||
65 | manager = new RmfBlocksManager("/tmp/p.rmf"); |
||
66 | HistogramRmfSerializer ser = new HistogramRmfSerializer();
|
||
67 | manager.addClient(ser); |
||
68 | |||
69 | try {
|
||
70 | manager.read(null);
|
||
71 | histogram = (Histogram)manager.getResult(); |
||
72 | } catch (ParsingException e) {
|
||
73 | e.printStackTrace(); |
||
74 | } |
||
75 | |||
76 | } |
||
77 | |||
78 | } |