Statistics
| Revision:

root / trunk / extensions / extJCRS / src-test / org / gvsig / crs / jgridshift / JGridShiftTest.java @ 20583

History | View | Annotate | Download (1.2 KB)

1
package org.gvsig.crs.jgridshift;
2

    
3
import java.io.FileNotFoundException;
4
import java.io.IOException;
5
import java.io.RandomAccessFile;
6

    
7
import au.com.objectix.jgridshift.GridShift;
8
import au.com.objectix.jgridshift.GridShiftFile;
9
import au.com.objectix.jgridshift.SubGrid;
10

    
11
public class JGridShiftTest {
12
        
13
        public static void main(String[] args){
14
                //InputStream fis = null;
15
                RandomAccessFile raf = null;
16
                try {
17
                        raf = new RandomAccessFile("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb","r");
18
                        //fis = new FileInputStream("/home/dguerrero/Desarrollo-gvSIG/crs/workspace/extJCRS/data/sped2et.gsb");
19
                } catch (FileNotFoundException e) {
20
                        // TODO Auto-generated catch block
21
                        e.printStackTrace();
22
                }
23
                GridShiftFile gsf = new GridShiftFile();
24
                try {
25
                        gsf.loadGridShiftFile(raf);
26
                } catch (IOException e) {
27
                        // TODO Auto-generated catch block
28
                        e.printStackTrace();
29
                }
30
                
31
                SubGrid subGrid[] = gsf.getSubGridTree(); 
32
                System.out.println(subGrid.length);
33
                System.out.println(subGrid[0].getMaxLat());
34
                System.out.println(subGrid[0].getMinLat());
35
                System.out.println(subGrid[0].getMaxLon());
36
                System.out.println(subGrid[0].getMinLon());
37
                GridShift gridShift = new GridShift();
38
        }
39

    
40
}