Statistics
| Revision:

gvsig-3d / 2.1 / branches / org.gvsig.view3d_vector_and_extrusion_2.3 / org.gvsig.view3d / org.gvsig.view3d / org.gvsig.view3d.swing / org.gvsig.view3d.swing.impl / src / main / java / org / gvsig / view3d / swing / impl / layers / LayerConverter.java @ 708

History | View | Annotate | Download (2.97 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright � 2007-2015 gvSIG Association
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

    
25
package org.gvsig.view3d.swing.impl.layers;
26

    
27
import org.gvsig.fmap.dal.exception.DataException;
28
import org.gvsig.fmap.mapcontext.layers.FLayer;
29
import org.gvsig.view3d.swing.api.MapControl3D;
30
import org.gvsig.view3d.swing.impl.layers.raster.DefaultTiledImageLayer;
31

    
32
import gov.nasa.worldwind.globes.ElevationModel;
33
import gov.nasa.worldwind.layers.Layer;
34

    
35
/**
36
 * Factory to convert {@link FLayer} to {@link Layer} or {@link ElevationModel}.
37
 * 
38
 * @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
39
 */
40
public interface LayerConverter {
41

    
42
    /**
43
     * Converts {@link FLayer} to {@link Layer}. The type of
44
     * <code>WW Layer</code> and WorldWind properties is defined by the 3D
45
     * properties of <code>FLayer</code>. If there are some parameters undefined
46
     * is set to default value.
47
     * 
48
     * @param mapControl
49
     *            context of <code>FLayer</code>.
50
     * @param layer
51
     *            <code>FLayer</code> to be converted.
52
     * @return An instance of {@link DefaultTiledImageLayer}.
53
     * @throws DataException
54
     *             if there are some problems getting some information of
55
     *             <code>FLayer</code>.
56
     */
57
    public Layer convertToLayer(MapControl3D mapControl, FLayer layer)
58
        throws DataException;
59

    
60
    /**
61
     * Converts {@link FLayer} to {@link ElevationModel}.
62
     * <code>ElevationModel</code> properties are definied by 3D properties of
63
     * The type of <code>WW ElevationModel</code> is defined by the 3D
64
     * properties of <code>FLayer</code>. If there are some parameters undefined
65
     * is set to default value.
66
     * 
67
     * @param mapControl
68
     *            context of <code>FLayer</code>.
69
     * @param layer
70
     *            <code>FLayer</code> to be converted.
71
     * @return An instance of {@link DefaultTiledImageLayer}.
72
     * @throws DataException
73
     *             if there are some problems getting some information of
74
     *             <code>FLayer</code>.
75
     */
76
    public ElevationModel convertToElevationModel(MapControl3D mapControl,
77
        FLayer layer);
78
}