📄 shapereader.html
字号:
</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> <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="ShapeReader()"><!-- --></A><H3>ShapeReader</H3><PRE>public <B>ShapeReader</B>()</PRE><DL></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="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</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>[] args)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="openURL()"><!-- --></A><H3>openURL</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> <B>openURL</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/MalformedURLException.html" title="class or interface in java.net">MalformedURLException</A></PRE><DL><DD>This method will prompt the user for a shapefile. <p> This method will call System.exit() if the user presses cancel. </p><P><DD><DL><DT><B>Returns:</B><DD>url to selected shapefile.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/MalformedURLException.html" title="class or interface in java.net">MalformedURLException</A></CODE></DL></DD></DL><HR><A NAME="openShapefile(java.net.URL)"><!-- --></A><H3>openShapefile</H3><PRE>public static <A HREF="../../../../org/geotools/data/shapefile/ShapefileDataStore.html" title="class in org.geotools.data.shapefile">ShapefileDataStore</A> <B>openShapefile</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> shapeURL) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/MalformedURLException.html" title="class or interface in java.net">MalformedURLException</A></PRE><DL><DD>This method will open a shapefile directly using the ShapefileDatastore. <p> Please note this is "wrong" and limits your code to working with shapefiles for no reason. Look at openShapefile2 for a better example.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>shapeURL</CODE> - An URL for the shapefile<DT><B>Returns:</B><DD>the ShapefileDataStore which contains the shapefile data.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/MalformedURLException.html" title="class or interface in java.net">MalformedURLException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/demo/data/ShapeReader.html#openShapefile2(java.net.URL)"><CODE>openShapefile2(java.net.URL)</CODE></A></DL></DD></DL><HR><A NAME="openShapefile2(java.net.URL)"><!-- --></A><H3>openShapefile2</H3><PRE>public static <A HREF="../../../../org/geotools/data/DataStore.html" title="interface in org.geotools.data">DataStore</A> <B>openShapefile2</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> url) 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>You can use the DataStoreFinder to find additional kinds of data access (including shapefile). <p> This will check the available jars on your class path, and return the first one that can work with the provided url. This example goes through each data store, geoserver actually includes two datastores that can read shapefiles (one with indexing one without). </p> <p> For your amusement we print out the parameters for the datastore used. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - <DT><B>Returns:</B><DD>DataStore for the provided URL<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 connection could not be made</DL></DD></DL><HR><A NAME="openShapefile3(java.net.URL)"><!-- --></A><H3>openShapefile3</H3><PRE>public static <A HREF="../../../../org/geotools/data/DataStore.html" title="interface in org.geotools.data">DataStore</A> <B>openShapefile3</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> url) 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>You can use the DataStoreFinder to find additional kinds of data access (including shapefile). <p> This will check the available jars on your class path, and return the first one that can work with the provided url. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - <DT><B>Returns:</B><DD>DataStore for the provided URL<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 connection could not be made</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/ShapeReader.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/demo/data/FilterExample.html" title="class in org.geotools.demo.data"><B>PREV CLASS</B></A> <A HREF="../../../../org/geotools/demo/data/ShapeReprojector.html" title="class in org.geotools.demo.data"><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="ShapeReader.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 + -