Revision 8426
trunk/libraries/libJCRS/src/org/gvsig/crs/Crs.java | ||
---|---|---|
36 | 36 |
Color gridColor = basicGridColor; |
37 | 37 |
CRSDatum datum = null; |
38 | 38 |
|
39 |
/** |
|
40 |
* Construye un CRS a partir del c?digo EPSG o de la cadena WKT. |
|
41 |
* |
|
42 |
* @param code |
|
43 |
* @throws CrsException |
|
44 |
*/ |
|
39 | 45 |
public Crs(String code) throws CrsException { |
40 | 46 |
String fullCode; |
41 | 47 |
setWKT(code); |
... | ... | |
91 | 97 |
throw new CrsException(e); |
92 | 98 |
} |
93 | 99 |
} |
94 |
// Asignar el datum y el crs base (en el caso de ser projectado):
|
|
100 |
// Asignar el datum y el crs base (en el caso de ser projectado):
|
|
95 | 101 |
if (!(crsWkt.getSpheroid()[1].equals("")||crsWkt.getSpheroid()[2].equals(""))){ |
96 | 102 |
double eSemiMajorAxis = Double.valueOf(crsWkt.getSpheroid()[1]).doubleValue(); |
97 | 103 |
double eIFlattening = Double.valueOf(crsWkt.getSpheroid()[2]).doubleValue(); |
... | ... | |
105 | 111 |
} |
106 | 112 |
} |
107 | 113 |
|
114 |
/** |
|
115 |
*Construye un CRS a partir del c?digo EPSG o de la cadena WKT. |
|
116 |
* |
|
117 |
* @param epsg_cod |
|
118 |
* @param code |
|
119 |
* @throws CrsException |
|
120 |
*/ |
|
108 | 121 |
public Crs(int epsg_cod, String code) throws CrsException { |
109 | 122 |
String fullCode; |
110 | 123 |
setWKT(code); |
... | ... | |
152 | 165 |
proj4 = CrsOgr.exportToProj4(oSRSSource); |
153 | 166 |
crsProj4 = new CrsProj(proj4); |
154 | 167 |
setName(fullCode); |
155 |
setAbrev(crsWkt.getName()); |
|
168 |
//setAbrev(crsWkt.getName()); |
|
169 |
setAbrev(crsWkt.getAuthority()[0]+":"+crsWkt.getAuthority()[1]); |
|
156 | 170 |
} catch (OGRException e) { |
157 | 171 |
throw new CrsException(e); |
158 | 172 |
} catch (crsgdalException e) { |
... | ... | |
175 | 189 |
} |
176 | 190 |
} |
177 | 191 |
|
192 |
/** |
|
193 |
* Construye un CRS a partir del c?digo EPSG o de la cadena WKT. |
|
194 |
* En el caso de WKT le a?ade a la cadena proj4 el string params. |
|
195 |
* |
|
196 |
* @param epsg_cod |
|
197 |
* @param code |
|
198 |
* @param params |
|
199 |
* @throws CrsException |
|
200 |
*/ |
|
178 | 201 |
public Crs(int epsg_cod, String code,String params) throws CrsException { |
179 | 202 |
String fullCode; |
180 | 203 |
setCode(epsg_cod); |
trunk/libraries/libJCRS/src/org/gvsig/crs/repository/EpsgRepository.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha |
|
34 |
* Campus Universitario s/n |
|
35 |
* 02071 Alabacete |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 967 599 200 |
|
39 |
*/ |
|
40 |
|
|
41 |
package org.gvsig.crs.repository; |
|
42 |
|
|
43 |
import org.gvsig.crs.ICrs; |
|
44 |
|
|
45 |
/** |
|
46 |
* Repositorio de CRSs de EPSG |
|
47 |
* |
|
48 |
* @author Diego Guerrero Sevilla (diego.guerrero@uclm.es) |
|
49 |
* |
|
50 |
*/ |
|
51 |
public class EpsgRepository implements ICrsRepository { |
|
52 |
|
|
53 |
/** |
|
54 |
* Obtiene un CRS a partir de su c?digo EPSG. |
|
55 |
* |
|
56 |
* @param code Codigo EPSG del CRS. |
|
57 |
* @return ICrs |
|
58 |
*/ |
|
59 |
public ICrs getCrs(String code) { |
|
60 |
return null; |
|
61 |
} |
|
62 |
|
|
63 |
} |
|
0 | 64 |
trunk/libraries/libJCRS/src/org/gvsig/crs/repository/ICrsRepository.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha |
|
34 |
* Campus Universitario s/n |
|
35 |
* 02071 Alabacete |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 967 599 200 |
|
39 |
*/ |
|
40 |
|
|
41 |
package org.gvsig.crs.repository; |
|
42 |
|
|
43 |
import org.gvsig.crs.ICrs; |
|
44 |
|
|
45 |
/** |
|
46 |
* Interfaz para un repositorio de Sistemas de Referencia Coordenados (CRS) |
|
47 |
* |
|
48 |
* @author Diego Guerrero Sevilla (diego.guerrero@uclm.es) |
|
49 |
* |
|
50 |
*/ |
|
51 |
public interface ICrsRepository { |
|
52 |
|
|
53 |
/** |
|
54 |
* Obtiene un CRS a partir del c?digo que lo identifica en el repositorio. |
|
55 |
* |
|
56 |
* @param code Codigo de CRS en el repositorio. |
|
57 |
* @return ICrs |
|
58 |
*/ |
|
59 |
public ICrs getCrs(String code); |
|
60 |
|
|
61 |
} |
|
0 | 62 |
trunk/libraries/libJCRS/src/org/gvsig/crs/repository/Iau2000Repository.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha |
|
34 |
* Campus Universitario s/n |
|
35 |
* 02071 Alabacete |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 967 599 200 |
|
39 |
*/ |
|
40 |
|
|
41 |
package org.gvsig.crs.repository; |
|
42 |
|
|
43 |
import org.gvsig.crs.ICrs; |
|
44 |
|
|
45 |
/** |
|
46 |
* Repositorio de CRSs de IAU2000 |
|
47 |
* |
|
48 |
* @author Diego Guerrero Sevilla (diego.guerrero@uclm.es) |
|
49 |
* |
|
50 |
*/ |
|
51 |
public class Iau2000Repository implements ICrsRepository { |
|
52 |
|
|
53 |
/** |
|
54 |
* Obtiene un CRS a partir de su c?digo IAU2000. |
|
55 |
* |
|
56 |
* @param code Codigo IAU2000 del CRS. |
|
57 |
* @return ICrs |
|
58 |
*/ |
|
59 |
public ICrs getCrs(String code) { |
|
60 |
// TODO Auto-generated method stub |
|
61 |
return null; |
|
62 |
} |
|
63 |
|
|
64 |
} |
|
0 | 65 |
trunk/libraries/libJCRS/src/org/gvsig/crs/gui/dialog/CSSelectionDialog.java | ||
---|---|---|
35 | 35 |
private void init() { |
36 | 36 |
this.setBounds(0, 0, 600, 400); |
37 | 37 |
this.setLayout(new GridLayout(0,1)); |
38 |
this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10)); |
|
38 |
// this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
|
|
39 | 39 |
|
40 | 40 |
} |
41 | 41 |
|
trunk/libraries/libJCRS/src/org/gvsig/crs/gui/panels/ProjChooserPanel.java | ||
---|---|---|
94 | 94 |
csSelect = new CSSelectionDialog(); |
95 | 95 |
csSelect.setProjection(curProj); |
96 | 96 |
|
97 |
csSelect.setLayout(new GridLayout(0,1)); |
|
97 |
//csSelect.setLayout(new GridLayout(0,1));
|
|
98 | 98 |
|
99 | 99 |
PluginServices.getMDIManager().addWindow(csSelect); |
100 | 100 |
abrev = dataSource+ ":" +String.valueOf(curProj.getCode()); |
Also available in: Unified diff