Revision 908

View differences:

trunk/libraries/libjni-gdal/src-test/Ogr_test.java
1
/**********************************************************************
2
 * $Id$
3
 *
4
 * Name:     ogr-test.java
5
 * Project:  JGDAL. Interface java to gdal (Frank Warmerdam).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/*Copyright (C) 2004  Nacho Brodin <brodin_ign@gva.es>
11

  
12
 This program is free software; you can redistribute it and/or
13
 modify it under the terms of the GNU General Public License
14
 as published by the Free Software Foundation; either version 2
15
 of the License, or (at your option) any later version.
16

  
17
 This program is distributed in the hope that it will be useful,
18
 but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 GNU General Public License for more details.
21

  
22
 You should have received a copy of the GNU General Public License
23
 along with this program; if not, write to the Free Software
24
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
 */
26

  
27

  
28
import es.gva.cit.jgdal.*;
29

  
30

  
31
public class Ogr_test{
32
	
33
	public static void main(String[] args){
34
 
35
	  OGRRegisterAll.register();
36
	  
37
	  OGRDataSource ds=null;
38
	  OGRSFDriver drv=null;
39
	  OGRSFDriverRegistrar registro = new OGRSFDriverRegistrar();
40
	  
41
	  
42
	  try{
43
	  	registro.open(args[0],false,drv);
44
	  	int ndrivers = registro.getDriverCount();
45
	  	System.out.println("N?mero de drivers registrados: "+ndrivers);
46
	  	
47
	  	for(int i=0;i<ndrivers;i++)
48
	  		System.out.println(registro.getDriver(i).getName());
49
	  	System.out.println("*******************");
50
	  }catch(Exception e){
51
	  	e.printStackTrace();
52
	  }
53
	  
54
	  	  
55
	  
56
	  
57
	  
58
	  
59
	}  
60
}
0 61

  
trunk/libraries/libjni-gdal/src-test/Writetif.java
93 93
		  	
94 94
		  	dset_dstno.setGeoTransform(gt);
95 95
				  
96
		  	byte[] buf=null;
96
		  	GdalBuffer buf=null;
97 97
		  	for(int iBand=0;iBand<rastercount;iBand++){
98 98
		  		
99 99
		  		System.out.println("Lectura/Escritura banda..."+iBand);
trunk/libraries/libjni-gdal/.cdtproject
15 15
</item>
16 16
<item id="org.eclipse.cdt.make.core.buildtargets">
17 17
<buildTargets>
18
<target name="all" targetID="org.eclipse.cdt.make.MakeTargetBuilder" path="src-test">
19
<buildCommand>make</buildCommand>
20
<buildTarget>all</buildTarget>
21
<stopOnError>false</stopOnError>
22
<useDefaultCommand>true</useDefaultCommand>
23
</target>
18 24
<target name="all" targetID="org.eclipse.cdt.make.MakeTargetBuilder" path="">
19 25
<buildCommand>nmake</buildCommand>
20 26
<buildArguments>/f makefile.w32</buildArguments>

Also available in: Unified diff