Statistics
| Revision:

root / branches / F2 / extensions / extJCRS / src / org / gvsig / crs / gui / panels / InfoCRSPanel.java @ 18259

History | View | Annotate | Download (19.4 KB)

1
/* gvSIG. Sistema de Informacin Geogrfica 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 Ibez, 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.gui.panels;
42

    
43
import java.awt.BorderLayout;
44
import java.awt.Dimension;
45
import java.awt.FlowLayout;
46
import java.awt.Font;
47
import java.awt.GridLayout;
48
import java.awt.event.ActionEvent;
49
import java.awt.event.ActionListener;
50
import java.io.IOException;
51
import java.net.MalformedURLException;
52
import java.net.URL;
53

    
54
import javax.swing.JButton;
55
import javax.swing.JEditorPane;
56
import javax.swing.JLabel;
57
import javax.swing.JPanel;
58
import javax.swing.JScrollPane;
59
import javax.swing.JTable;
60
import javax.swing.ListSelectionModel;
61
import javax.swing.border.EmptyBorder;
62
import javax.swing.event.HyperlinkEvent;
63
import javax.swing.table.DefaultTableModel;
64

    
65
import org.cresques.ui.DefaultDialogPanel;
66
import org.gvsig.crs.CrsException;
67
import org.gvsig.crs.CrsFactory;
68
import org.gvsig.crs.ICrs;
69
import org.gvsig.crs.persistence.RecentTrsPersistence;
70
import org.gvsig.crs.persistence.TrData;
71

    
72
import com.iver.andami.PluginServices;
73
import com.iver.andami.persistence.generate.PluginsStatusDescriptor;
74
import com.iver.andami.ui.mdiManager.IWindow;
75
import com.iver.andami.ui.mdiManager.WindowInfo;
76

    
77
/**
78
 * Clase que genera el panel de informacin del CRS seleccionado
79
 * en el caso del repositorio de la EPSG
80
 * @author Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
81
 * @author Luisa Marina Fernndez (luisam.fernandez@uclm.es)
82
 *
83
 */
84
public class InfoCRSPanel extends DefaultDialogPanel implements IWindow, ActionListener{
85
        
86
        private static final long serialVersionUID = 1L;
87

    
88
        private JPanel panelLabels;
89
        
90
        private JTable jTable;
91
        public DefaultTableModel dtm = null;
92
        private JScrollPane jScrollPane1 = null;
93
        private JPanel jPanelbuttons;
94
        private JButton jButtonOk;
95
        
96
        private ICrs proj;
97
        
98
        private JLabel jLabelProjcs;
99
        private JLabel jLabelGeogcs;
100
        private JLabel jLabelDatum;
101
        private JLabel jLabelSpheroid;
102
        private JLabel jLabelPrimem;
103
        private JLabel jLabelProjection;
104
        private JLabel jLabelUnits;
105
        private JLabel jLabelUnits_p;
106
        private JLabel jLabelProjcsdinamic;
107
        private JLabel jLabelGeogcsdinamic;
108
        private JLabel jLabelDatumdinamic;
109
        private JLabel jLabelSpheroiddinamic;
110
        private JLabel jLabelPrimemdinamic;
111
        private JLabel jLabelProjectiondinamic;
112
        private JLabel jLabelUnitsdinamic;
113
        private JLabel jLabelUnits_pdinamic;
114
        
115
        private JEditorPane jEditorPane = null;
116
        private JScrollPane jScrollPane = null;
117
        private String page = "";
118
        private boolean isTransformation = false;
119
        private String details = null;
120
        private String transformationAuthority = null;
121
        private int transformationCode = -1;
122
        private String sourceCrs = null;
123
        private String targetCrs = null;
124
        private String transformationName = null;
125
        //private String
126
        
127
        
128
        public InfoCRSPanel(String fuente, int codigo) {
129
                super(false);                
130
                try {
131
                        proj = new CrsFactory().getCRS(fuente+":"+codigo);
132
                } catch (CrsException e) {
133
                        // TODO Auto-generated catch block
134
                        e.printStackTrace();
135
                }        
136
                inicializate();
137
        }
138
        
139
        public InfoCRSPanel(String fuente, int codigo, String trans) {
140
                super(false);                
141
                try {
142
                        proj = new CrsFactory().getCRS(fuente+":"+codigo);
143
                } catch (CrsException e) {
144
                        // TODO Auto-generated catch block
145
                        e.printStackTrace();
146
                }        
147
                if (!trans.equals(PluginServices.getText(this, "sin_transformacion"))) {
148
                        isTransformation = true;
149
                        details = trans;
150
                        RecentTrsPersistence trPersistence = new RecentTrsPersistence();
151
                        TrData crsTrDataArray[] = trPersistence.getArrayOfTrData();
152
                        
153
                        for (int iRow = crsTrDataArray.length-1; iRow >= 0; iRow--) {
154
                                if (details.equals(crsTrDataArray[iRow].getAuthority()+":"+crsTrDataArray[iRow].getCode()+" <--> "+crsTrDataArray[iRow].getDetails())) {
155
                                        //Ya tenemos todos los datos de la transformacion...
156
                                        transformationAuthority = crsTrDataArray[iRow].getAuthority();
157
                                        transformationCode = crsTrDataArray[iRow].getCode();
158
                                        sourceCrs = crsTrDataArray[iRow].getCrsSource();
159
                                        targetCrs = crsTrDataArray[iRow].getCrsTarget();
160
                                        transformationName = crsTrDataArray[iRow].getName();
161
                                        details = crsTrDataArray[iRow].getDetails();                                        
162
                                }
163
                        }
164
                        
165
                } 
166
                inicializate();
167
        }
168
        
169
        private void inicializate() {
170
                this.setLayout(new BorderLayout());
171
                JPanel p=new JPanel(new BorderLayout());
172
                p.setBorder(new EmptyBorder(0,10,0,10));
173
                //p.add(getPanel(),BorderLayout.NORTH);
174
                //p.add(getJScrollPane1(),BorderLayout.CENTER);
175
                createPage();
176
                
177
                p.add(getJScrollPane());
178
                
179
                this.add(p, BorderLayout.CENTER);
180
                this.add(getJPanelButtons(),BorderLayout.SOUTH);
181
        }
182

    
183
        private JPanel getPanel() {
184
                if(panelLabels == null) {
185
                        panelLabels = new JPanel();
186
                        panelLabels.setLayout(new GridLayout(4,2));
187
                        JPanel p00=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
188
                        p00.add(getJLabelProjcs());
189
                        p00.add(getJLabelProjcsDinamic());
190
                        JPanel p01=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
191
                        p01.add(getJLabelGeogcs());
192
                        p01.add(getJLabelGeogcsDinamic());
193
                        JPanel p10=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
194
                        p10.add(getJLabelDatum());
195
                        p10.add(getJLabelDatumDinamic());
196
                        JPanel p11=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
197
                        p11.add(getJLabelSpheroid());
198
                        p11.add(getJLabelSpheroidDinamic());
199
                        JPanel p20=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
200
                        p20.add(getJLabelPrimen());
201
                        p20.add(getJLabelPrimenDinamic());
202
                        JPanel p21=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
203
                        p21.add(getJLabelUnits());
204
                        p21.add(getJLabelUnitsDinamic());
205
                        JPanel p30=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
206
                        p30.add(getJLabelProjection());
207
                        p30.add(getJLabelProjectionDinamic());
208
                        JPanel p31=new JPanel(new FlowLayout(FlowLayout.LEFT,10,5));
209
                        p31.add(getJLabelUnits_p());
210
                        p31.add(getJLabelUnits_pDinamic());
211
                        
212
                        panelLabels.add(p00);
213
                        panelLabels.add(p01);
214
                        panelLabels.add(p10);
215
                        panelLabels.add(p11);
216
                        panelLabels.add(p20);
217
                        panelLabels.add(p21);
218
                        panelLabels.add(p30);
219
                        panelLabels.add(p31);
220
                        
221
                }
222
                return panelLabels;
223
        }
224
        
225
        private JPanel getJPanelButtons() {
226
                if(jPanelbuttons == null) {
227
                        jPanelbuttons = new JPanel();
228
                        jPanelbuttons.setLayout(new FlowLayout(FlowLayout.RIGHT,10,10));
229
                        jPanelbuttons.add(getJButtonOk(),null);
230
                }
231
                return jPanelbuttons;
232
        }
233
        
234
        private JButton getJButtonOk() {
235
                if(jButtonOk == null) {
236
                        jButtonOk = new JButton();
237
                        jButtonOk.setText(PluginServices.getText(this,"ok"));
238
                        jButtonOk.setPreferredSize(new Dimension(100,25));
239
                        jButtonOk.setMnemonic('O');
240
                        jButtonOk.setToolTipText("Accept");
241
                        jButtonOk.addActionListener(this);
242
                }
243
                return jButtonOk;
244
        }
245
        
246
        private JLabel getJLabelProjcs() {
247
                if(jLabelProjcs == null) {
248
                        jLabelProjcs = new JLabel();
249
                        jLabelProjcs.setFont(new Font("Projcs:",Font.BOLD,10));
250
                        jLabelProjcs.setText(PluginServices.getText(this,"projcs")+":");
251
                }
252
                return jLabelProjcs;
253
        }
254
        
255
        private JLabel getJLabelProjcsDinamic() {
256
                if(jLabelProjcsdinamic == null) {
257
                        jLabelProjcsdinamic = new JLabel();
258
                        jLabelProjcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
259
                        jLabelProjcsdinamic.setText(proj.getCrsWkt().getProjcs());
260
                }
261
                return jLabelProjcsdinamic;
262
        }
263
        
264
        private JLabel getJLabelGeogcs() {
265
                if(jLabelGeogcs == null) {
266
                        jLabelGeogcs = new JLabel();
267
                        jLabelGeogcs.setFont(new Font("Geogcs:",Font.BOLD,10));
268
                        jLabelGeogcs.setText(PluginServices.getText(this,"geogcs")+ ":");
269
                }
270
                return jLabelGeogcs;
271
        }
272
        
273
        private JLabel getJLabelGeogcsDinamic() {
274
                if(jLabelGeogcsdinamic == null) {
275
                        jLabelGeogcsdinamic = new JLabel();
276
                        jLabelGeogcsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
277
                        jLabelGeogcsdinamic.setText(proj.getCrsWkt().getGeogcs());
278
                }
279
                return jLabelGeogcsdinamic;
280
        }
281
        
282
        private JLabel getJLabelDatum() {
283
                if(jLabelDatum == null) {
284
                        jLabelDatum = new JLabel();
285
                        jLabelDatum.setFont(new Font("Datum:",Font.BOLD,10));
286
                        jLabelDatum.setText(PluginServices.getText(this,"datum")+":");
287
                }
288
                return jLabelDatum;
289
        }
290
        
291
        private JLabel getJLabelDatumDinamic() {
292
                if(jLabelDatumdinamic == null) {
293
                        jLabelDatumdinamic = new JLabel();
294
                        jLabelDatumdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
295
                        jLabelDatumdinamic.setText(proj.getCrsWkt().getDatumName());
296
                }
297
                return jLabelDatumdinamic;
298
        }
299
        
300
        private JLabel getJLabelSpheroid() {
301
                if(jLabelSpheroid == null) {
302
                        jLabelSpheroid = new JLabel();
303
                        jLabelSpheroid.setFont(new Font("Spheroid",Font.BOLD,10));
304
                        jLabelSpheroid.setText(PluginServices.getText(this,"spheriod")+":");
305
                }
306
                return jLabelSpheroid;
307
        }
308
        
309
        private JLabel getJLabelSpheroidDinamic() {
310
                if(jLabelSpheroiddinamic == null) {
311
                        String[] sphe = proj.getCrsWkt().getSpheroid();
312
                        jLabelSpheroiddinamic = new JLabel();
313
                        jLabelSpheroiddinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
314
                        jLabelSpheroiddinamic.setText(sphe[0]+" , "+sphe[1]+" , "+sphe[2]);
315
                }
316
                return jLabelSpheroiddinamic;
317
        }
318
        
319
        private JLabel getJLabelPrimen() {
320
                if(jLabelPrimem == null) {
321
                        jLabelPrimem = new JLabel();
322
                        jLabelPrimem.setFont(new Font("Primen:",Font.BOLD,10));
323
                        jLabelPrimem.setText(PluginServices.getText(this,"primem")+":");
324
                }
325
                return jLabelPrimem;
326
        }
327
        
328
        private JLabel getJLabelPrimenDinamic() {
329
                if(jLabelPrimemdinamic == null) {
330
                        String pri[] = proj.getCrsWkt().getPrimen();
331
                        jLabelPrimemdinamic = new JLabel();
332
                        jLabelPrimemdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
333
                        jLabelPrimemdinamic.setText(pri[0]+" , "+pri[1]);
334
                }
335
                return jLabelPrimemdinamic;
336
        }
337
        
338
        private JLabel getJLabelProjection() {
339
                if(jLabelProjection == null) {
340
                        jLabelProjection = new JLabel();
341
                        jLabelProjection.setFont(new Font("Projection",Font.BOLD,10));
342
                        jLabelProjection.setText(PluginServices.getText(this,"projection")+":");
343
                }
344
                return jLabelProjection;
345
        }
346
        
347
        private JLabel getJLabelProjectionDinamic() {
348
                if(jLabelProjectiondinamic == null) {
349
                        jLabelProjectiondinamic = new JLabel();
350
                        jLabelProjectiondinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
351
                        jLabelProjectiondinamic.setText(proj.getCrsWkt().getProjection());
352
                }
353
                return jLabelProjectiondinamic;
354
        }
355
        
356
        private JLabel getJLabelUnits() {
357
                if(jLabelUnits == null) {
358
                        jLabelUnits = new JLabel();
359
                        jLabelUnits.setFont(new Font("Units",Font.BOLD,10));
360
                        jLabelUnits.setText(PluginServices.getText(this,"units")+":");
361
                }
362
                return jLabelUnits;
363
        }
364
        
365
        private JLabel getJLabelUnitsDinamic() {
366
                if(jLabelUnitsdinamic == null) {
367
                        String[] units = proj.getCrsWkt().getUnit();
368
                        jLabelUnitsdinamic = new JLabel();
369
                        jLabelUnitsdinamic.setPreferredSize(new Dimension(200,20));
370
                        jLabelUnitsdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
371
                        jLabelUnitsdinamic.setText(units[0]+" , "+units[1]);
372
                        System.out.println("Unidades:  "+ units[0]+" , "+units[1]);
373

    
374
                }
375
                return jLabelUnitsdinamic;
376
        }
377
        
378
        private JLabel getJLabelUnits_p() {
379
                if(jLabelUnits_p == null) {
380
                        jLabelUnits_p = new JLabel();
381
                        jLabelUnits_p.setFont(new Font("",Font.BOLD,10));
382
                        jLabelUnits_p.setText(PluginServices.getText(this,"units_p")+":");
383
                }
384
                return jLabelUnits_p;
385
        }
386
        
387
        private JLabel getJLabelUnits_pDinamic() {
388
                if(jLabelUnits_pdinamic == null) {
389
                        String[] uni_p = proj.getCrsWkt().getUnit_p();
390
                        jLabelUnits_pdinamic = new JLabel();
391
                        jLabelUnits_pdinamic.setFont(new Font("",Font.ROMAN_BASELINE,10));
392
                        jLabelUnits_pdinamic.setText(uni_p[0]+" , "+uni_p[1]);
393
                        
394
                }
395
                return jLabelUnits_pdinamic;
396
        }
397
        
398
        private JScrollPane getJScrollPane1() {
399
                if(jScrollPane1 == null) {
400
                        jScrollPane1 = new JScrollPane();
401
                        jScrollPane1.setPreferredSize(new Dimension(400,150));
402
                        jScrollPane1.setViewportView(getJTable());
403
                }
404
                return jScrollPane1;
405
        }
406
        
407
        private JTable getJTable() {
408
                if(jTable == null) {
409
                        String[] columnNames = {PluginServices.getText(this,"nombre")
410
                                        ,PluginServices.getText(this,"valor")};
411
                        String[] param_n = proj.getCrsWkt().getParam_name();
412
                        String[] param_v = proj.getCrsWkt().getParam_value();
413
                        Object[][]data;
414
                        if(param_v != null) {
415
                                data = new Object[param_v.length][2];
416
                                for(int i = 0 ; i < 2 ; i++ )
417
                                        for(int j = 0 ; j < param_n.length ; j++) {
418
                                                if(i == 0)
419
                                                        data[j][i] = param_n[j];
420
                                                else
421
                                                        data[j][i] = param_v[j];
422
                                        }
423
                        } else 
424
                                data = new Object[1][1];
425
                        dtm = new DefaultTableModel(data, columnNames);
426
                        jTable = new JTable(dtm);
427
                        jTable.setCellSelectionEnabled(false);
428
                        jTable.setRowSelectionAllowed(true);
429
                        jTable.setColumnSelectionAllowed(false);
430
                        jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
431
                        
432
                }
433
                return jTable;
434
        }
435

    
436
        public WindowInfo getWindowInfo() {
437
                WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
438
                   m_viewinfo.setTitle(PluginServices.getText(this,proj.getCrsWkt().getName()));
439
                   m_viewinfo.setWidth(600);
440
                   m_viewinfo.setHeight(500);
441
                return m_viewinfo;
442
        }
443

    
444
        public void actionPerformed(ActionEvent e) {
445
                if (e.getSource() == getJButtonOk()){
446
                        PluginServices.getMDIManager().closeWindow(this);
447
                }
448
        }
449
        
450
        /**
451
         * This method initializes jScrollPane        
452
         *         
453
         * @return javax.swing.JScrollPane        
454
         */    
455
        private JScrollPane getJScrollPane() {
456
                
457
                // if (jScrollPane == null) {
458
                        jScrollPane = new JScrollPane();
459
                        jScrollPane.setPreferredSize(new java.awt.Dimension(300,450));
460
                        jScrollPane.setViewportView(getJEditorPane());
461
                // }
462
                return jScrollPane;
463
        }
464
        /**
465
         * This method initializes jEditorPane1        
466
         *         
467
         * @return javax.swing.JEditorPane        
468
         */    
469
        private JEditorPane getJEditorPane() {
470
                // if (jEditorPane == null) {
471
                        jEditorPane = new JEditorPane();
472
                        
473
                        jEditorPane.setEditable(false);
474
                        jEditorPane.setContentType("text/html");
475
                        jEditorPane.setPreferredSize(new java.awt.Dimension(300,450));
476
                        
477
                        
478
                        jEditorPane.setText(page);//Page(aboutURL);
479
                          
480
                        
481
                // }
482
                return jEditorPane;
483
        }
484
        
485
        private void createPage() {
486
                String title = PluginServices.getText(this, "infoCRS");
487
                
488
                page += "<html>  <head>  <title>"+title+"</title> <meta content=\"\"> <style></style> </head> <body>";
489
                page += "<p align=\"center\"><font size=5><b>"+title.toUpperCase()+"</font></b></p>";
490
                //Primera fila, codigo y repositorio
491
                page += "<br><table width=\"100%\" border=\"0\">  " +
492
                                "<tr> " +
493
                                        "<td width=\"50%\">"+PluginServices.getText(this, "codeSelectedCrs")+": "+proj.getCode()+"</td> " +
494
                                        "<td width=\"50%\"><div align=\"center\">"+PluginServices.getText(this, "repository")+": "+proj.getCrsWkt().getAuthority()[0]+"</div></td> " +
495
                                "</tr>";
496
                
497
                String projected;
498
                if (proj.getCrsWkt().getProjcs().equals(""))
499
                        projected = PluginServices.getText(this, "no");
500
                else
501
                        projected = PluginServices.getText(this, "si");                
502
                
503
                //Segunda fila, nombre y proyeccion                
504
                page += "<tr> " +
505
                        "<td width=\"50%\">"+PluginServices.getText(this, "nameSelectedCrs")+": "+proj.getCrsWkt().getName()+"</td> " +
506
                        "<td width=\"50%\"><div align=\"center\">"+PluginServices.getText(this, "projected")+": "+projected+"</div></td> " +
507
                "</tr>";
508
                
509
                //Nombre del datum
510
                page += "<tr> " +
511
                        "<td width=\"60%\">"+PluginServices.getText(this, "nameDatum")+": "+proj.getCrsWkt().getDatumName()+"</td> " +
512
                        "<td width=\"40%\"><div align=\"center\">"+"</div></td> " +
513
                "</tr>";
514
                
515
                page +="</table>";
516
                
517
                //Datos del elipsoide
518
                page += "<br><table width=\"100%\" border=\"2\">  " +
519
                                "<tr> " +
520
                                        "<td align=\"center\"><b>"+PluginServices.getText(this, "ellipsoid")+": "+proj.getCrsWkt().getSpheroid()[0]+"</b></td> " +
521
                                "</tr>";
522
                
523
                page += "<tr> " +
524
                                        "<td>"+PluginServices.getText(this, "semiMajorAxis")+"</td> " +
525
                                        "<td><div align=\"center\">"+proj.getCrsWkt().getSpheroid()[1]+"</div></td> " +
526
                                "</tr>";
527
                page += "<tr> " +
528
                                        "<td>"+PluginServices.getText(this, "invFlattening")+"</td> " +
529
                                        "<td><div align=\"center\">"+proj.getCrsWkt().getSpheroid()[2]+"</div></td> " +
530
                                "</tr>";
531
                page += "</table>";
532
                
533
                //Datos del prime meridian
534
                page += "<br><table width=\"100%\" border=\"2\">  " +
535
                "<tr> " +
536
                        "<td align=\"center\"><b>"+PluginServices.getText(this, "primeMeridian")+": "+proj.getCrsWkt().getPrimen()[0]+"</b></td> " +
537
                "</tr>";
538

    
539
                page += "<tr> " +
540
                        "<td>"+PluginServices.getText(this, "greenwichLongitude")+"</td> " +
541
                        "<td><div align=\"center\">"+proj.getCrsWkt().getPrimen()[1]+"</div></td> " +
542
                "</tr>";
543
                
544
                page += "</table>";
545
                
546
                //Si es proyectado procedemos a concatenar la proyección y sus parámetros
547
                if (projected.equals(PluginServices.getText(this, "si"))) {
548
                                                
549
                        //proyeccion
550
                        page += "<p><font size=4>"+PluginServices.getText(this, "projection")+": <b>"+proj.getCrsWkt().getProjection()+"</b></font></p>";
551
                        
552
                        //Parametros
553
                        page += "<p align=\"center\">"+PluginServices.getText(this, "parameters")+"<table width=\"100%\" border=\"2\">  ";
554
                        for (int i = 0; i < proj.getCrsWkt().getParam_name().length; i++) {
555
                                
556
                                page += "<tr> " +
557
                                        "<td align=\"center\">"+PluginServices.getText(this, proj.getCrsWkt().getParam_name()[i])+"</td> " +
558
                                        "<td align=\"center\">"+proj.getCrsWkt().getParam_value()[i]+"</td> " +
559
                                "</tr>";
560
                        }
561
                        page += "</table>";
562
                }
563
                
564
                try {
565
                        page += "<p>"+PluginServices.getText(this, "proj4Chain")+": "+ proj.getProj4String() +"</p>";
566
                } catch (CrsException e) {
567
                        // TODO Auto-generated catch block
568
                        e.printStackTrace();
569
                }
570
                
571
                if (isTransformation) {
572
                        
573
                        //Titulo de la transformacion
574
                        page += "<p align=\"center\"><font size=5><b>"+PluginServices.getText(this, "transformation")+"</b></font></p>";
575
                        
576
                        //Tipo de transformacion y codigo si es EPSG
577
                        page += "<p>"+PluginServices.getText(this, "type_transformation")+": ";
578
                        
579
                        if (transformationAuthority.equals(PluginServices.getText(this, "USR"))) {
580
                                page += PluginServices.getText(this, "user")+"</p>";
581
                        }
582
                        else if (transformationAuthority.equals(PluginServices.getText(this, "EPSG"))) {
583
                                page += PluginServices.getText(this, "EPSG")+":"+transformationCode+"</p>";
584
                                //nombre de la transformacion
585
                                page += "<p>"+PluginServices.getText(this, "name")+": "+transformationName+"</p>";
586
                        }
587
                        else if (transformationAuthority.equals(PluginServices.getText(this, "NADGR"))) {
588
                                page += PluginServices.getText(this, "nadgrids")+"</p>";
589
                        }
590
                        else if (transformationAuthority.equals(PluginServices.getText(this, "COMP"))) {
591
                                page += PluginServices.getText(this, "compound")+"</p>";
592
                        }
593
                        
594
                        //Fuente y destino de la transformacion
595
                        page += "<br><table width=\"100%\" border=\"0\">  " +
596
                        "<tr> " +
597
                                "<td align=\"center\">"+PluginServices.getText(this, "source_crs")+": "+sourceCrs+"</td> " +
598
                                "<td align=\"center\">"+PluginServices.getText(this, "target_crs")+": "+targetCrs+"</td> " +
599
                        "</tr></table>";
600
                        
601
                        page += "<p>"+PluginServices.getText(this, "detailsTransformation")+": "+details+"</p>";        
602
                        
603
                }
604
                
605
                page += "</body> </html>";
606
        }
607
}