📄 pointarray2d.html
字号:
int upper)</PRE><DL><DD>Returns an array that share the points in this array from point inclusive to exclusive. If the subarray doesn't contains any point (i.e. if ), then this method returns .<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>lower</CODE> - Index of the first point, inclusive.<DD><CODE>upper</CODE> - Index of the last point, exclusive.</DL></DD></DL><HR><A NAME="insertAt(int, org.geotools.geometry.array.PointArray2D, boolean)"><!-- --></A><H3>insertAt</H3><PRE>public final <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html" title="class in org.geotools.geometry.array">PointArray2D</A> <B>insertAt</B>(int index, <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html" title="class in org.geotools.geometry.array">PointArray2D</A> toMerge, boolean reverse)</PRE><DL><DD>Inserts all points from into at position . If is , then the points are inserted in reverse order.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index where to insert the first point in this array.<DD><CODE>toMerge</CODE> - The points to insert.<DD><CODE>reverse</CODE> - for inserting the coordinates in reverse order.</DL></DD></DL><HR><A NAME="insertAt(int, float[], int, int, boolean)"><!-- --></A><H3>insertAt</H3><PRE>public abstract <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html" title="class in org.geotools.geometry.array">PointArray2D</A> <B>insertAt</B>(int index, float[] toMerge, int lower, int upper, boolean reverse)</PRE><DL><DD>Inserts an array of (<var>x</var>,<var>y</var>) coordinates at position . If is , then the points are inserted in reverse order.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index where to insert the first point in this array.<DD><CODE>toMerge</CODE> - The points to insert as an array of (<var>x</var>,<var>y</var>) coordinates.<DD><CODE>lower</CODE> - Index (inclusive) of the first ordinates to copy from .<DD><CODE>upper</CODE> - Index (exclusive) of the last ordinates to copy from .<DD><CODE>reverse</CODE> - for inserting the coordinates in reverse order.<DT><B>Returns:</B><DD>An array which contains all data from this array, with the data inserted into. May returns if the insertion has been applied in-place.</DL></DD></DL><HR><A NAME="reverse()"><!-- --></A><H3>reverse</H3><PRE>public abstract <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html" title="class in org.geotools.geometry.array">PointArray2D</A> <B>reverse</B>()</PRE><DL><DD>Reverts all coordinate points order in this array. The last point become first, and the first point become last.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>All array which contains the points in reversed order. May returns if the operation has been applied in-place.</DL></DD></DL><HR><A NAME="getFinal(org.geotools.geometry.array.CompressionLevel)"><!-- --></A><H3>getFinal</H3><PRE>public <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html" title="class in org.geotools.geometry.array">PointArray2D</A> <B>getFinal</B>(<A HREF="../../../../org/geotools/geometry/array/CompressionLevel.html" title="class in org.geotools.geometry.array">CompressionLevel</A> level)</PRE><DL><DD>Returns an immutable copy of this array. Invoking any <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html#insertAt(int, org.geotools.geometry.array.PointArray2D, boolean)"><CODE>insertAt</CODE></A> or <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html#reverse()"><CODE>reverse</CODE></A> method on the returned array while result in a new array being returned by the above-cited methods, instead of performing the operations in-place. In addition, this method can optionnaly compress the data.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>level</CODE> - The compression level, or if no compression is wanted.<DT><B>Returns:</B><DD>An immutable (and optionnaly compressed) copy of this array, or if this array already meet the requirements, or if this array doesn't contain any data.</DL></DD></DL><HR><A NAME="toFloatArray(org.geotools.geometry.array.ArrayData, float)"><!-- --></A><H3>toFloatArray</H3><PRE>public abstract void <B>toFloatArray</B>(<A HREF="../../../../org/geotools/geometry/array/ArrayData.html" title="class in org.geotools.geometry.array">ArrayData</A> dest, float resolutionSquared)</PRE><DL><DD>Appends (<var>x</var>,<var>y</var>) coordinates to the specified destination array. The destination array will be filled starting at index <A HREF="../../../../org/geotools/geometry/array/ArrayData.html#length()"><CODE>ArrayData.length()</CODE></A>. If is greater than 0, then points that are closer than from previous one will be skiped. <p> <strong>Implementation note</strong><br> Many implementations will compute distances using Pythagoras formulas, which is okay for projected CRS but not strictly right for geographic CRS. This is not a real problem when the <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getObjectiveCRS()">objective CRS</A> is the same one than the <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html#getCoordinateReferenceSystem()">data CRS</A>, since the decimation performed by this method target specifically the rendering device. However, it may be a problem when the objective CRS is different, since points that are equidistant in the data CRS may not be equidistant in the objective CRS. In order to minimize the deformations induced by map projections, this method should be invoked only on objects covering a relatively small geographic area. objects covering a large geographic area shall be splitted into smaller objects using the <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html#subarray(int, int)"><CODE>subarray</CODE></A> method.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>dest</CODE> - The destination array.<DD><CODE>resolutionSquared</CODE> - The minimum squared distance desired between points. A value of 0 keep all points.</DL></DD></DL><HR><A NAME="toFloatArray()"><!-- --></A><H3>toFloatArray</H3><PRE>public final float[] <B>toFloatArray</B>()</PRE><DL><DD>Returns a copy of all (<var>x</var>,<var>y</var>) coordinates in this array.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="toShape(java.awt.geom.AffineTransform)"><!-- --></A><H3>toShape</H3><PRE>public final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">Shape</A> <B>toShape</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/AffineTransform.html" title="class or interface in java.awt.geom">AffineTransform</A> transform)</PRE><DL><DD>Returns this as a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">shape</A>. This shape is not designed for map rendering. It is rather a debugging tool, as well as a convenient way to draw lines in some simple context.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>transform</CODE> - An optional transform to apply on coordinates, or if none.<DT><B>Returns:</B><DD>The lines in this as a Java2D <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">shape</A>.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public final <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 array. This method is mostly for debugging purpose and may change in any future Geotools version. Current implementation returns the class name, the number of points and the start and end coordinates.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="equals(org.geotools.geometry.array.PointArray2D)"><!-- --></A><H3>equals</H3><PRE>public final boolean <B>equals</B>(<A HREF="../../../../org/geotools/geometry/array/PointArray2D.html" title="class in org.geotools.geometry.array">PointArray2D</A> that)</PRE><DL><DD>Compares this array with the specified one for equality. Two arrays are considered identical if they contains the same coordinates in the same order. The actual array implementation doesn't matter.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public final boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> that)</PRE><DL><DD>Compares this array with the specified object for equality. This method performs the same comparaison than <A HREF="../../../../org/geotools/geometry/array/PointArray2D.html#equals(org.geotools.geometry.array.PointArray2D)"><CODE>equals(PointArray2D)</CODE></A>.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public final int <B>hashCode</B>()</PRE><DL><DD>Returns a hash value for this array.<P><DD><DL></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/PointArray2D.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/array/CompressionLevel.html" title="class in org.geotools.geometry.array"><B>PREV CLASS</B></A> <A HREF="../../../../org/geotools/geometry/array/PointIterator.html" title="class in org.geotools.geometry.array"><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="PointArray2D.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <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 + -