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 @ 42309
History | View | Annotate | Download (3.03 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 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 3
|
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.fmap.geom.primitive; |
26 |
|
27 |
import org.gvsig.fmap.geom.DirectPosition; |
28 |
|
29 |
/**
|
30 |
* <p>
|
31 |
* This interface is equivalent to the GM_Point specified in
|
32 |
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
|
33 |
* It is the basic data type for a geometric object consisting
|
34 |
* of one and only one point.
|
35 |
* </p>
|
36 |
* @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
|
37 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
38 |
*/
|
39 |
public interface Point extends Primitive { |
40 |
|
41 |
/**
|
42 |
* Gets the {@link DirectPosition of a point}, that is
|
43 |
* composed by a set of ordinates
|
44 |
* @return
|
45 |
* The direct position
|
46 |
*/
|
47 |
public DirectPosition getDirectPosition();
|
48 |
|
49 |
/**
|
50 |
* Sets a ordinate in a concrete dimension
|
51 |
* @param dimension
|
52 |
* The dimension to set
|
53 |
* @param value
|
54 |
* The value to set
|
55 |
*/
|
56 |
void setCoordinateAt(int dimension, double value); |
57 |
|
58 |
/**
|
59 |
* Sets the point coordinates
|
60 |
*
|
61 |
* @param value
|
62 |
* The coordinates to set
|
63 |
* @deprecated Use {@link #setCoordinateAt(int, double))} instead
|
64 |
*/
|
65 |
void setCoordinates(double[] values); |
66 |
|
67 |
/**
|
68 |
* Sets the X coordinate
|
69 |
* @param x
|
70 |
* The value to set
|
71 |
*/
|
72 |
void setX(double x); |
73 |
|
74 |
/**
|
75 |
* Sets the Y coordinate
|
76 |
* @param y
|
77 |
* The value to set
|
78 |
*/
|
79 |
void setY(double y); |
80 |
|
81 |
/**
|
82 |
* Gets the coordinate in a concrete dimension
|
83 |
* @param dimension
|
84 |
* The ordinate dimension
|
85 |
* @return
|
86 |
* The value of the ordinate
|
87 |
*/
|
88 |
double getCoordinateAt(int dimension); |
89 |
|
90 |
/**
|
91 |
* Returns an array of coordinates. Don't use the provided array to modify
|
92 |
* the point coordinates, but use the {@link #setCoordinateAt(int, double))}
|
93 |
* , {@link #setX(double))} or {@link #setY(double))} methods instead.
|
94 |
*
|
95 |
* @return The point coordinates
|
96 |
* @deprecated Use {@link #getCoordinateAt(int)} instead
|
97 |
*/
|
98 |
double[] getCoordinates(); |
99 |
|
100 |
/**
|
101 |
* Returns the X coordinate
|
102 |
* @return
|
103 |
* The X coordinate
|
104 |
*/
|
105 |
double getX();
|
106 |
|
107 |
/**
|
108 |
* Returns the Y coordinate
|
109 |
* @return
|
110 |
* The Y coordinate
|
111 |
*/
|
112 |
double getY();
|
113 |
} |