gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / util / CRSUtils.java @ 2443
History | View | Annotate | Download (2.2 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.fmap.dal.coverage.util; |
23 |
|
24 |
import org.cresques.cts.ICRSFactory; |
25 |
import org.cresques.cts.IProjection; |
26 |
/**
|
27 |
* Esta clase se encarga de hacer la conversion entre Wkt e IProjection.
|
28 |
*
|
29 |
* El uso se hace mediante dos llamadas estaticas que son: convertIProjectionToWkt y
|
30 |
* convertWktToIProjection.
|
31 |
*
|
32 |
* Antes de usarlos, hay que saber si tenemos acceso a gvSIG e intentar coger el factory desde all?.
|
33 |
* Ya que su uso consume tiempo y espacio de memoria y es preferible reaprovechar ese objeto ya
|
34 |
* creado. Esto se hace con setCRSFactory.
|
35 |
*
|
36 |
* En caso de no asignarse el ya existente, el crear? uno interno y lo dejara en una variable estatica.
|
37 |
*
|
38 |
* @version 11/07/2008
|
39 |
* @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
|
40 |
*/
|
41 |
public interface CRSUtils { |
42 |
|
43 |
/**
|
44 |
* Asigna la instancia interna a CRSFactory. Es bueno asignarlo si ya existe para evitar su creaci?n.
|
45 |
* @param factory
|
46 |
*/
|
47 |
public void setCRSFactory(ICRSFactory factory); |
48 |
|
49 |
/**
|
50 |
* Convierte una cadena de texto Wkt a IProjection
|
51 |
* @param wkt
|
52 |
* @return
|
53 |
*/
|
54 |
public IProjection convertWktToIProjection(String wkt); |
55 |
|
56 |
/**
|
57 |
* Convierte un IProjection a una cadena de texto Wkt
|
58 |
* @param projection
|
59 |
* @return
|
60 |
*/
|
61 |
public String convertIProjectionToWkt(IProjection projection); |
62 |
} |