Revision 12802
branches/F2/libraries/libJCRS/src-test/es/idr/test/TestGeotools21.java | ||
---|---|---|
13 | 13 |
*/ |
14 | 14 |
public static void main(String[] args) { |
15 | 15 |
try { |
16 |
String strEpsgCode="EPSG:23030";
|
|
16 |
String strEpsgCode="EPSG:27572";
|
|
17 | 17 |
CoordinateReferenceSystem source; |
18 | 18 |
source = CRS.decode(strEpsgCode); |
19 | 19 |
System.out.println(source.toWKT()); |
branches/F2/libraries/libJCRS/src-test/org/gvsig/crs/repository/RepositoryTest.java | ||
---|---|---|
7 | 7 |
public static void main(String[] args){ |
8 | 8 |
EpsgRepository epsgRep= new EpsgRepository(); |
9 | 9 |
Crs crs = (Crs)epsgRep.getCrs("23030"); |
10 |
String abrev = crs.getAbrev(); |
|
11 |
System.out.println(abrev); |
|
10 |
if (crs != null){ |
|
11 |
String abrev = crs.getAbrev(); |
|
12 |
System.out.println(abrev); |
|
13 |
} |
|
14 |
else |
|
15 |
System.out.println("el c?digo no existe en el repositorio."); |
|
12 | 16 |
} |
13 | 17 |
} |
branches/F2/libraries/libJCRS/src/org/gvsig/crs/repository/EpsgRepository.java | ||
---|---|---|
101 | 101 |
}*/ |
102 | 102 |
|
103 | 103 |
try { |
104 |
result.next(); |
|
104 |
if (!result.next()) |
|
105 |
return null; |
|
105 | 106 |
source_cod = result.getInt("source_geogcrs_code"); |
106 | 107 |
projection_conv_code = result.getInt("projection_conv_code"); |
107 | 108 |
crs_kind = result.getString("coord_ref_sys_kind"); |
branches/F2/libraries/libJCRS/src/org/gvsig/crs/repository/Iau2000Repository.java | ||
---|---|---|
88 | 88 |
e.printStackTrace(); |
89 | 89 |
} |
90 | 90 |
try { |
91 |
result.next(); |
|
91 |
if (!result.next()) |
|
92 |
return null; |
|
92 | 93 |
cadWKT = result.getString("iau_wkt"); |
93 | 94 |
} catch (SQLException e1) { |
94 | 95 |
e1.printStackTrace(); |
branches/F2/libraries/libJCRS/src/org/gvsig/crs/repository/EsriRepository.java | ||
---|---|---|
45 | 45 |
import org.gvsig.crs.Crs; |
46 | 46 |
import org.gvsig.crs.CrsException; |
47 | 47 |
import org.gvsig.crs.ICrs; |
48 |
import org.gvsig.crs.ogr.Iau2wkt; |
|
49 | 48 |
|
50 | 49 |
import es.idr.teledeteccion.connection.EpsgConnection; |
51 | 50 |
import es.idr.teledeteccion.connection.Query; |
... | ... | |
82 | 81 |
e.printStackTrace(); |
83 | 82 |
} |
84 | 83 |
try { |
85 |
result.next(); |
|
84 |
if (!result.next()) |
|
85 |
return null; |
|
86 | 86 |
cadWKT = result.getString("esri_wkt"); |
87 | 87 |
} catch (SQLException e1) { |
88 | 88 |
e1.printStackTrace(); |
branches/F2/libraries/libJCRS/src/org/gvsig/crs/repository/UsrRepository.java | ||
---|---|---|
37 | 37 |
e.printStackTrace(); |
38 | 38 |
} |
39 | 39 |
try { |
40 |
result.next(); |
|
40 |
if (!result.next()) |
|
41 |
return null; |
|
41 | 42 |
cadWKT = result.getString("usr_wkt"); |
42 | 43 |
} catch (SQLException e1) { |
43 | 44 |
e1.printStackTrace(); |
Also available in: Unified diff