📄 generaldirectposition.html
字号:
<DT><B>Returns:</B><DD>The dimensionality of this position.</DL></DD></DL><HR><A NAME="getCoordinates()"><!-- --></A><H3>getCoordinates</H3><PRE>public final double[] <B>getCoordinates</B>()</PRE><DL><DD>Returns a sequence of numbers that hold the coordinate of this position in its reference system.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getCoordinates</CODE> in interface <CODE>DirectPosition</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A copy of the <A HREF="../../../org/geotools/geometry/GeneralDirectPosition.html#ordinates">coordinates</A>.</DL></DD></DL><HR><A NAME="getOrdinate(int)"><!-- --></A><H3>getOrdinate</H3><PRE>public final double <B>getOrdinate</B>(int dimension) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE><DL><DD>Returns the ordinate at the specified dimension.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getOrdinate</CODE> in interface <CODE>DirectPosition</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>dimension</CODE> - The dimension in the range 0 to <A HREF="../../../org/geotools/geometry/GeneralDirectPosition.html#getDimension()">dimension</A>-1.<DT><B>Returns:</B><DD>The coordinate at the specified dimension.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the specified dimension is out of bounds.</DL></DD></DL><HR><A NAME="setOrdinate(int, double)"><!-- --></A><H3>setOrdinate</H3><PRE>public final void <B>setOrdinate</B>(int dimension, double value) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE><DL><DD>Sets the ordinate value along the specified dimension.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>setOrdinate</CODE> in interface <CODE>DirectPosition</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>dimension</CODE> - the dimension for the ordinate of interest.<DD><CODE>value</CODE> - the ordinate value of interest.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if the specified dimension is out of bounds.</DL></DD></DL><HR><A NAME="setLocation(org.opengis.spatialschema.geometry.DirectPosition)"><!-- --></A><H3>setLocation</H3><PRE>public final void <B>setLocation</B>(DirectPosition position) throws MismatchedDimensionException</PRE><DL><DD>Set this coordinate to the specified direct position. If the specified position contains a coordinate reference system, then the CRS for this position will be set to the CRS of the specified position.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>position</CODE> - The new position for this point.<DT><B>Throws:</B><DD><CODE>MismatchedDimensionException</CODE> - if this point doesn't have the expected dimension.<DT><B>Since:</B></DT> <DD>2.2</DD></DL></DD></DL><HR><A NAME="setLocation(org.geotools.geometry.GeneralDirectPosition)"><!-- --></A><H3>setLocation</H3><PRE>public final void <B>setLocation</B>(<A HREF="../../../org/geotools/geometry/GeneralDirectPosition.html" title="class in org.geotools.geometry">GeneralDirectPosition</A> position) throws MismatchedDimensionException</PRE><DL><DD>Set this coordinate to the specified direct position. This method is identical to <A HREF="../../../org/geotools/geometry/GeneralDirectPosition.html#setLocation(org.opengis.spatialschema.geometry.DirectPosition)"><CODE>setLocation(DirectPosition)</CODE></A>, but is slightly faster in the special case of an implementation.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>position</CODE> - The new position for this point.<DT><B>Throws:</B><DD><CODE>MismatchedDimensionException</CODE> - if this point doesn't have the expected dimension.</DL></DD></DL><HR><A NAME="setLocation(java.awt.geom.Point2D)"><!-- --></A><H3>setLocation</H3><PRE>public final void <B>setLocation</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom">Point2D</A> point) throws MismatchedDimensionException</PRE><DL><DD>Set this coordinate to the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom"><CODE>Point2D</CODE></A>. This coordinate must be two-dimensional.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>point</CODE> - The new coordinate for this point.<DT><B>Throws:</B><DD><CODE>MismatchedDimensionException</CODE> - if this coordinate point is not two-dimensional.</DL></DD></DL><HR><A NAME="toPoint2D()"><!-- --></A><H3>toPoint2D</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom">Point2D</A> <B>toPoint2D</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE><DL><DD>Returns a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom"><CODE>Point2D</CODE></A> with the same coordinate as this direct position. This is a convenience method for interoperability with Java2D.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this coordinate point is not two-dimensional.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE><DL><DD>Returns a string representation of this coordinate. The default implementation formats this coordinate using a shared instance of <A HREF="../../../org/geotools/measure/CoordinateFormat.html" title="class in org.geotools.measure"><CODE>CoordinateFormat</CODE></A>. This is okay for occasional formatting (for example for debugging purpose). But if there is a lot of positions to format, users will get better performance and more control by using their own instance of <A HREF="../../../org/geotools/measure/CoordinateFormat.html" title="class in org.geotools.measure"><CODE>CoordinateFormat</CODE></A>.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="toString(org.opengis.spatialschema.geometry.DirectPosition)"><!-- --></A><H3>toString</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>(DirectPosition position)</PRE><DL><DD>Formats the specified position. <strong>NOTE:</strong> This convenience method uses a shared instance of <A HREF="../../../org/geotools/measure/CoordinateFormat.html" title="class in org.geotools.measure"><CODE>CoordinateFormat</CODE></A>. This is okay for occasional formatting. But if a lot of position needs to be formatted, it is more efficient to use an other instance of <A HREF="../../../org/geotools/measure/CoordinateFormat.html" title="class in org.geotools.measure"><CODE>CoordinateFormat</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Since:</B></DT> <DD>2.3</DD></DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns a hash value for this coordinate. This value need not remain consistent between different implementations of the same class.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>clone</B>()</PRE><DL><DD>Returns a deep copy of this position.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>clone</CODE> in interface <CODE>DirectPosition</CODE></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/GeneralDirectPosition.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/geotools/geometry/Envelope2D.html" title="class in org.geotools.geometry"><B>PREV CLASS</B></A> <A HREF="../../../org/geotools/geometry/GeneralEnvelope.html" title="class in org.geotools.geometry"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="GeneralDirectPosition.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 1996-2007 <a href="http://www.geotools.org">Geotools</a>. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -