root / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / Point.java @ 38595
History | View | Annotate | Download (3.04 KB)
1 | 26788 | jpiera | /* 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 | 20761 | jmvivo | package org.gvsig.fmap.geom.primitive; |
29 | 21048 | jiyarza | |
30 | 24207 | jiyarza | import org.gvsig.fmap.geom.DirectPosition; |
31 | 21048 | jiyarza | |
32 | 20761 | jmvivo | /**
|
33 | 28990 | jpiera | * <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 | 26788 | jpiera | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
41 | 20761 | jmvivo | */
|
42 | 33650 | jpiera | public interface Point extends Primitive { |
43 | 24207 | jiyarza | |
44 | 28990 | jpiera | /**
|
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 | 24207 | jiyarza | public DirectPosition getDirectPosition();
|
51 | 26788 | jpiera | |
52 | 28990 | jpiera | /**
|
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 | 26788 | jpiera | void setCoordinateAt(int dimension, double value); |
60 | 36223 | cordinyana | |
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 | 26788 | jpiera | void setCoordinates(double[] values); |
69 | |||
70 | 28990 | jpiera | /**
|
71 | * Sets the X coordinate
|
||
72 | * @param x
|
||
73 | * The value to set
|
||
74 | */
|
||
75 | 26788 | jpiera | void setX(double x); |
76 | |||
77 | 28990 | jpiera | /**
|
78 | * Sets the Y coordinate
|
||
79 | * @param y
|
||
80 | * The value to set
|
||
81 | */
|
||
82 | 26788 | jpiera | void setY(double y); |
83 | |||
84 | 28990 | jpiera | /**
|
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 | 26788 | jpiera | double getCoordinateAt(int dimension); |
92 | 36223 | cordinyana | |
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 | 26788 | jpiera | double[] getCoordinates(); |
102 | |||
103 | 28990 | jpiera | /**
|
104 | * Returns the X coordinate
|
||
105 | * @return
|
||
106 | * The X coordinate
|
||
107 | */
|
||
108 | 26788 | jpiera | double getX();
|
109 | |||
110 | 28990 | jpiera | /**
|
111 | * Returns the Y coordinate
|
||
112 | * @return
|
||
113 | * The Y coordinate
|
||
114 | */
|
||
115 | 26788 | jpiera | double getY();
|
116 | |||
117 | 24207 | jiyarza | } |