Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libJCRS / src / org / gvsig / crs / proj / OperationCrs.java @ 8405

History | View | Annotate | Download (1.46 KB)

1
package org.gvsig.crs.proj;
2

    
3

    
4
public class OperationCrs extends JNIBaseOperation
5
{
6
        public static void operate(double[] firstCoord,
7
                                                             double[] secondCoord,
8
                                                             double[] thirdCoord,
9
                                                             CrsProj srcCrs,
10
                                                             CrsProj destCrs)
11
                                                                 throws OperationCrsException,
12
                                                                                CrsProjException {
13

    
14
                int error=operation(firstCoord,secondCoord,thirdCoord,
15
                                          srcCrs.getPtr(),destCrs.getPtr());
16
                if(error!=1) throw new OperationCrsException(srcCrs,destCrs);
17
        }
18
        
19
        public static void operateSimple(double firstCoord,
20
                                                                         double secondCoord,
21
                                                                         double thirdCoord,
22
                                                                         CrsProj srcCrs,
23
                                                                         CrsProj destCrs) throws OperationCrsException,
24
                                                                                                                          CrsProjException {
25
                
26
                int error = operationSimple(firstCoord, secondCoord, thirdCoord,
27
                                                                         srcCrs.getPtr(),destCrs.getPtr());
28
                if(error!=1) throw new OperationCrsException(srcCrs,destCrs);
29
        }
30
        
31
        public static void operateArraySimple(double[] Coord,
32
                                                                                  CrsProj srcCrs,
33
                                                                                  CrsProj destCrs)throws OperationCrsException,
34
                                                                                          CrsProjException {
35

    
36
                int error = operationArraySimple(Coord,srcCrs.getPtr(),destCrs.getPtr());
37
                
38
                if(error!=1) throw new OperationCrsException(srcCrs,destCrs);
39
                
40
        }
41
        public static int compareDatums(CrsProj crs1, CrsProj crs2){
42
                int compare = 0;
43
                try {
44
                        compare = compareDatums(crs1.getPtr(),crs2.getPtr());
45
                } catch (CrsProjException e) {
46
                        // TODO Auto-generated catch block
47
                        e.printStackTrace();
48
                }        
49
                return compare;
50
        }
51
}