⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shapefilereader.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#goTo(int)">goTo</A></B>(int&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Needs better data, what is the requirements for offset?</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#hasNext()">hasNext</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If there exists another record. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#main(java.lang.String[])">main</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;args)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.Record.html" title="class in org.geotools.data.shapefile.shp">ShapefileReader.Record</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#nextRecord()">nextRecord</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetch the next record information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileHeader.html" title="class in org.geotools.data.shapefile.shp">ShapefileHeader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#readHeader(java.nio.channels.ReadableByteChannel, boolean)">readHeader</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A>&nbsp;channel,           boolean&nbsp;strict)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A short cut for reading the header from the given channel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.Record.html" title="class in org.geotools.data.shapefile.shp">ShapefileReader.Record</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#recordAt(int)">recordAt</A></B>(int&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the current location of the byteStream to offset and returns the next record. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#setHandler(org.geotools.data.shapefile.shp.ShapeHandler)">setHandler</A></B>(<A HREF="../../../../../org/geotools/data/shapefile/shp/ShapeHandler.html" title="interface in org.geotools.data.shapefile.shp">ShapeHandler</A>&nbsp;handler)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#shapeAt(int)">shapeAt</A></B>(int&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TODO needs better java docs!!! </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#supportsRandomAccess()">supportsRandomAccess</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileReader.html#transferTo(org.geotools.data.shapefile.shp.ShapefileWriter, int, double[])">transferTo</A></B>(<A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileWriter.html" title="class in org.geotools.data.shapefile.shp">ShapefileWriter</A>&nbsp;writer,           int&nbsp;recordNum,           double[]&nbsp;bounds)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transfer (by bytes) the data at the current record to the ShapefileWriter.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class <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></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="ShapefileReader(java.nio.channels.ReadableByteChannel, boolean, boolean, org.geotools.data.shapefile.Lock)"><!-- --></A><H3>ShapefileReader</H3><PRE>public <B>ShapefileReader</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A>&nbsp;channel,                       boolean&nbsp;strict,                       boolean&nbsp;useMemoryMapped,                       <A HREF="../../../../../org/geotools/data/shapefile/Lock.html" title="class in org.geotools.data.shapefile">Lock</A>&nbsp;lock)                throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,                       <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileException.html" title="class in org.geotools.data.shapefile.shp">ShapefileException</A></PRE><DL><DD>Creates a new instance of ShapeFile.<P><DT><B>Parameters:</B><DD><CODE>channel</CODE> - The ReadableByteChannel this reader will use.<DD><CODE>strict</CODE> - True to make the header parsing throw Exceptions if the            version or magic number are incorrect.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If problems arise.<DD><CODE><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileException.html" title="class in org.geotools.data.shapefile.shp">ShapefileException</A></CODE> - If for some reason the file contains invalid records.</DL><HR><A NAME="ShapefileReader(java.nio.channels.ReadableByteChannel, org.geotools.data.shapefile.Lock)"><!-- --></A><H3>ShapefileReader</H3><PRE>public <B>ShapefileReader</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A>&nbsp;channel,                       <A HREF="../../../../../org/geotools/data/shapefile/Lock.html" title="class in org.geotools.data.shapefile">Lock</A>&nbsp;lock)                throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,                       <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileException.html" title="class in org.geotools.data.shapefile.shp">ShapefileException</A></PRE><DL><DD>Default constructor. Calls ShapefileReader(channel,true).<P><DT><B>Parameters:</B><DD><CODE>channel</CODE> - <DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DD><CODE><A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileException.html" title="class in org.geotools.data.shapefile.shp">ShapefileException</A></CODE></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="readHeader(java.nio.channels.ReadableByteChannel, boolean)"><!-- --></A><H3>readHeader</H3><PRE>public static <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileHeader.html" title="class in org.geotools.data.shapefile.shp">ShapefileHeader</A> <B>readHeader</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A>&nbsp;channel,                                         boolean&nbsp;strict)                                  throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>A short cut for reading the header from the given channel.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>channel</CODE> - The channel to read from.<DD><CODE>strict</CODE> - True to make the header parsing throw Exceptions if the            version or magic number are incorrect.<DT><B>Returns:</B><DD>A ShapefileHeader object.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If problems arise.</DL></DD></DL><HR><A NAME="ensureCapacity(java.nio.ByteBuffer, int, boolean)"><!-- --></A><H3>ensureCapacity</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A> <B>ensureCapacity</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A>&nbsp;buffer,                                        int&nbsp;size,                                        boolean&nbsp;useMemoryMappedBuffer)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="fill(java.nio.ByteBuffer, java.nio.channels.ReadableByteChannel)"><!-- --></A><H3>fill</H3><PRE>public static int <B>fill</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A>&nbsp;buffer,                       <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/channels/ReadableByteChannel.html" title="class or interface in java.nio.channels">ReadableByteChannel</A>&nbsp;channel)                throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DD></DL><HR><A NAME="getHeader()"><!-- --></A><H3>getHeader</H3><PRE>public <A HREF="../../../../../org/geotools/data/shapefile/shp/ShapefileHeader.html" title="class in org.geotools.data.shapefile.shp">ShapefileHeader</A> <B>getHeader</B>()</PRE><DL><DD>Get the header. Its parsed in the constructor.<P><DD><DL><DT><B>Returns:</B><DD>The header that is associated with this file.</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()           throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Clean up any resources. Closes the channel.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If errors occur while closing the channel.</DL></DD></DL><HR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -