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
/**
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
package org.gvsig.fmap.geom.primitive;
25

    
26
import org.gvsig.fmap.geom.DirectPosition;
27
import org.gvsig.fmap.geom.Geometry;
28
import org.gvsig.fmap.geom.operation.GeometryOperationException;
29
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException;
30

    
31
/**
32
 * <p>
33
 * This interface is equivalent to the GM_Point specified in
34
 * <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
 * </p>
38
 *
39
 * @see
40
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO
41
 * 19107</a>
42
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
43
 */
44
public interface Point extends Primitive {
45

    
46
    /**
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

    
54
    /**
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

    
62
    /**
63
     * Sets the point coordinates
64
     *
65
     * @param values 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
     *
73
     * @param x The value to set
74
     */
75
    void setX(double x);
76

    
77
    /**
78
     * Sets the Y coordinate
79
     *
80
     * @param y The value to set
81
     */
82
    void setY(double y);
83

    
84
    /**
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

    
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
     *
97
     * @return The point coordinates
98
     * @deprecated Use {@link #getCoordinateAt(int)} instead
99
     */
100
    double[] getCoordinates();
101

    
102
    /**
103
     * Returns the X coordinate
104
     *
105
     * @return The X coordinate
106
     */
107
    double getX();
108

    
109
    /**
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
    public Point force3D() throws GeometryOperationNotSupportedException, GeometryOperationException;
124

    
125
    public Point force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException;
126

    
127
    public Point force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException;
128

    
129
}