Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.api / src / main / java / org / gvsig / fmap / geom / primitive / Point.java @ 40435

History | View | Annotate | Download (3.04 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

    
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2009 {Iver T.I.}   {Task}
26
*/
27

    
28
package org.gvsig.fmap.geom.primitive;
29

    
30
import org.gvsig.fmap.geom.DirectPosition;
31

    
32
/**
33
 * <p>
34
 * This interface is equivalent to the GM_Point specified in 
35
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
36
 * It is the basic data type for a geometric object consisting 
37
 * of one and only one point. 
38
 * </p>
39
 * @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
40
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
41
 */
42
public interface Point extends Primitive {
43
        
44
        /**
45
         * Gets the {@link DirectPosition of a point}, that is
46
         * composed by a set of ordinates
47
         * @return
48
         * The direct position
49
         */
50
        public DirectPosition getDirectPosition();
51
        
52
        /**
53
         * Sets a ordinate in a concrete dimension
54
         * @param dimension
55
         * The dimension to set
56
         * @param value
57
         * The value to set
58
         */
59
        void setCoordinateAt(int dimension, double value);
60

    
61
    /**
62
     * Sets the point coordinates
63
     * 
64
     * @param value
65
     *            The coordinates to set
66
     * @deprecated Use {@link #setCoordinateAt(int, double))} instead
67
     */
68
        void setCoordinates(double[] values);
69
        
70
        /**
71
         * Sets the X coordinate
72
         * @param x
73
         * The value to set
74
         */
75
        void setX(double x);
76
        
77
        /**
78
         * Sets the Y coordinate
79
         * @param y
80
         * The value to set
81
         */
82
        void setY(double y);
83
        
84
        /**
85
         * Gets the coordinate in a concrete dimension
86
         * @param dimension
87
         * The ordinate dimension
88
         * @return
89
         * The value of the ordinate
90
         */
91
        double getCoordinateAt(int dimension);
92

    
93
    /**
94
     * Returns an array of coordinates. Don't use the provided array to modify
95
     * the point coordinates, but use the {@link #setCoordinateAt(int, double))}
96
     * , {@link #setX(double))} or {@link #setY(double))} methods instead.
97
     * 
98
     * @return The point coordinates
99
     * @deprecated Use {@link #getCoordinateAt(int)} instead
100
     */
101
        double[] getCoordinates();
102
        
103
        /**
104
         * Returns the X coordinate 
105
         * @return
106
         * The X coordinate
107
         */
108
        double getX();
109
        
110
        /**
111
         * Returns the Y coordinate 
112
         * @return
113
         * The Y coordinate
114
         */
115
        double getY();
116
        
117
}