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 @ 47432

History | View | Annotate | Download (3.83 KB)

1 40559 jjdelcerro
/**
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 40435 jjdelcerro
package org.gvsig.fmap.geom.primitive;
25
26
import org.gvsig.fmap.geom.DirectPosition;
27 45673 jjdelcerro
import org.gvsig.fmap.geom.Geometry;
28
import org.gvsig.fmap.geom.operation.GeometryOperationException;
29
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
30 40435 jjdelcerro
31
/**
32
 * <p>
33 42309 fdiaz
 * This interface is equivalent to the GM_Point specified in
34 45673 jjdelcerro
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO
35
 * 19107</a>. It is the basic data type for a geometric object consisting of one
36
 * and only one point.
37 40435 jjdelcerro
 * </p>
38 45673 jjdelcerro
 *
39
 * @see
40
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO
41
 * 19107</a>
42 40435 jjdelcerro
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
43
 */
44
public interface Point extends Primitive {
45 42309 fdiaz
46 45673 jjdelcerro
    /**
47
     * Gets the {@link DirectPosition of a point}, that is composed by a set of
48
     * ordinates
49
     *
50
     * @return The direct position
51
     */
52
    public DirectPosition getDirectPosition();
53 42309 fdiaz
54 45673 jjdelcerro
    /**
55
     * Sets a ordinate in a concrete dimension
56
     *
57
     * @param dimension The dimension to set
58
     * @param value The value to set
59
     */
60
    void setCoordinateAt(int dimension, double value);
61 40435 jjdelcerro
62
    /**
63
     * Sets the point coordinates
64 42309 fdiaz
     *
65 44040 jjdelcerro
     * @param values The coordinates to set
66 40435 jjdelcerro
     * @deprecated Use {@link #setCoordinateAt(int, double))} instead
67
     */
68 45673 jjdelcerro
    void setCoordinates(double[] values);
69 42309 fdiaz
70 45673 jjdelcerro
    /**
71
     * Sets the X coordinate
72
     *
73
     * @param x The value to set
74
     */
75
    void setX(double x);
76 42309 fdiaz
77 45673 jjdelcerro
    /**
78
     * Sets the Y coordinate
79
     *
80
     * @param y The value to set
81
     */
82
    void setY(double y);
83 42309 fdiaz
84 45673 jjdelcerro
    /**
85
     * Gets the coordinate in a concrete dimension
86
     *
87
     * @param dimension The ordinate dimension
88
     * @return The value of the ordinate
89
     */
90
    double getCoordinateAt(int dimension);
91 40435 jjdelcerro
92
    /**
93
     * Returns an array of coordinates. Don't use the provided array to modify
94
     * the point coordinates, but use the {@link #setCoordinateAt(int, double))}
95
     * , {@link #setX(double))} or {@link #setY(double))} methods instead.
96 42309 fdiaz
     *
97 40435 jjdelcerro
     * @return The point coordinates
98
     * @deprecated Use {@link #getCoordinateAt(int)} instead
99
     */
100 45673 jjdelcerro
    double[] getCoordinates();
101 42309 fdiaz
102 45673 jjdelcerro
    /**
103
     * Returns the X coordinate
104
     *
105
     * @return The X coordinate
106
     */
107
    double getX();
108 42309 fdiaz
109 45673 jjdelcerro
    /**
110
     * Returns the Y coordinate
111
     *
112
     * @return The Y coordinate
113
     */
114
    double getY();
115
116
    public Point cloneGeometry();
117
118
    public Point clone() throws CloneNotSupportedException;
119
120
    @Override
121
    public Point force2D() throws GeometryOperationNotSupportedException, GeometryOperationException;
122
123 47432 fdiaz
    public Point force3D() throws GeometryOperationNotSupportedException, GeometryOperationException;
124 45673 jjdelcerro
125 47432 fdiaz
    public Point force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException;
126 45673 jjdelcerro
127 47432 fdiaz
    public Point force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException;
128 45673 jjdelcerro
129 40767 jjdelcerro
}