Revision 8500 trunk/libraries/libJCRS/src/org/gvsig/crs/repository/EpsgRepository.java
EpsgRepository.java | ||
---|---|---|
59 | 59 |
*/ |
60 | 60 |
public class EpsgRepository implements ICrsRepository { |
61 | 61 |
|
62 |
public EpsgConnection connect = null; |
|
62 |
public EpsgConnection connection = null;
|
|
63 | 63 |
|
64 | 64 |
public EpsgRepository() { |
65 |
connect = new EpsgConnection(); |
|
66 |
connect.setConnectionEPSG(); |
|
65 |
connection = new EpsgConnection(); |
|
67 | 66 |
} |
68 | 67 |
|
69 | 68 |
/** |
... | ... | |
90 | 89 |
+ "FROM epsg_coordinatereferencesystem " |
91 | 90 |
+ "WHERE coord_ref_sys_code = " + code; |
92 | 91 |
|
93 |
result = Query.select(sentence,connect.getConnection()); |
|
92 |
connection.setConnectionEPSG(); |
|
93 |
result = Query.select(sentence,connection.getConnection()); |
|
94 | 94 |
|
95 |
/*try { |
|
96 |
connection.shutdown(); |
|
97 |
} catch (SQLException e) { |
|
98 |
// TODO Auto-generated catch block |
|
99 |
e.printStackTrace(); |
|
100 |
}*/ |
|
101 |
|
|
95 | 102 |
try { |
96 | 103 |
result.next(); |
97 | 104 |
source_cod = result.getInt("source_geogcrs_code"); |
... | ... | |
104 | 111 |
|
105 | 112 |
if (datum_code != 0){ |
106 | 113 |
source_yn = true; |
107 |
GetCRSepsg ep = new GetCRSepsg(epsg_code, source_yn, source_cod, projection_conv_code, connect); |
|
114 |
GetCRSepsg ep = new GetCRSepsg(epsg_code, source_yn, source_cod, projection_conv_code, connection);
|
|
108 | 115 |
ep.Getepsgdata(); |
109 | 116 |
} |
110 | 117 |
else if (source_cod != 0){ |
... | ... | |
112 | 119 |
} |
113 | 120 |
else source_yn = true; |
114 | 121 |
|
115 |
GetCRSepsg ep = new GetCRSepsg(epsg_code, source_yn, source_cod, projection_conv_code, connect); |
|
122 |
GetCRSepsg ep = new GetCRSepsg(epsg_code, source_yn, source_cod, projection_conv_code, connection);
|
|
116 | 123 |
ep.Getepsgdata(); |
117 | 124 |
|
118 | 125 |
if (crs_kind.equals("geographic 2D") || crs_kind.equals("geographic 3D")){ |
... | ... | |
134 | 141 |
// TODO Auto-generated catch block |
135 | 142 |
e.printStackTrace(); |
136 | 143 |
} |
137 |
|
|
138 | 144 |
return crs; |
139 | 145 |
} |
140 | 146 |
|
Also available in: Unified diff