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

📄 miffile.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 </TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/data/mif/MIFFile.html#copyFileAndDelete(java.io.File, java.io.File, boolean)">copyFileAndDelete</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;in,                  <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;out,                  boolean&nbsp;deleteIn)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for copying or moving files</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../org/geotools/data/FeatureReader.html" title="interface in org.geotools.data">FeatureReader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/data/mif/MIFFile.html#getFeatureReader()">getFeatureReader</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Opens the MIF file for input and returns a FeatureReader for accessing the features. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../org/geotools/data/FeatureWriter.html" title="interface in org.geotools.data">FeatureWriter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/data/mif/MIFFile.html#getFeatureWriter()">getFeatureWriter</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a FeatureWriter for writing features to the MIF/MID file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/data/mif/MIFFile.html#getFileHandler(java.io.File, java.lang.String, java.lang.String, boolean)">getFileHandler</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;path,               <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;fileName,               <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;ext,               boolean&nbsp;mustExist)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for initFiles - returns a File given a parent path, the file name without extension and the extension Tests different extension case for case-sensitive filesystems</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/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/data/mif/MIFFile.html#getHeaderClause(java.lang.String)">getHeaderClause</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;clause)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the value for an header clause</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/data/mif/MIFFile.html#getMifName(java.lang.String)">getMifName</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;fName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of a .mif file without extension</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/data/mif/MIFFile.html#getSchema()">getSchema</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the MIF schema</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 =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="MAX_STRING_LEN"><!-- --></A><H3>MAX_STRING_LEN</H3><PRE>public static final int <B>MAX_STRING_LEN</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.geotools.data.mif.MIFFile.MAX_STRING_LEN">Constant Field Values</A></DL></DL><!-- ========= 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="MIFFile(java.lang.String, java.util.Map)"><!-- --></A><H3>MIFFile</H3><PRE>public <B>MIFFile</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;path,               <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&nbsp;params)        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><p> This constructor opens an existing MIF/MID file, and creates the corresponding schema from the file header </p>  <p> Allowed parameters in params Map: </p>  <ul> <li> "namespace" = URI of the namespace prefix for FeatureTypes </li> <li> PARAM_GEOMFACTORY = GeometryFactory object to be used for creating geometries; alternatively, use PARAM_SRID; </li> <li> PARAM_SRID = SRID to be used for creating geometries; </li> <li> PARAM_FIELDCASE = field names tranformation: "upper" to uppercase | "lower" to lowercase | "" none; </li> <li> PARAM_GEOMNAME = &lt;String&gt, name of the geometry field (defaults to "the_geom"); </li> <li> PARAM_GEOMTYPE = geometry type handling: "untyped" uses Geometry class | "typed" force geometry to the type of the first valid geometry found in file | "multi" like typed, but forces LineString to MultilineString and Polygon to MultiPolygon; | "Point" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "Text" forces Geometry to Point and creates a MIF_TEXT String field in the schema </li> </ul>  <p> Header clauses values can also be set in the params Map, but they might be overridden by values read from MIF header. </p>  <p> Basic usage: </p> <pre><code>   HashMap params = new HashMap();   // params.put(MIFFile.PARAM_GEOMFACTORY, new GeometryFactory(new PrecisionModel(PrecisionModel.FLOATING_SINGLE), SRID));   params.put(MIFFile.PARAM_SRID, new Integer(SRID));   params.put(MIFFile.PARAM_FIELDCASE, "upper");   params.put(MIFFile.PARAM_GEOMNAME, "GEOM");   params.put(MIFFile.PARAM_GEOMTYPE, "typed");   MIFFile mf = new MIFFile("c:/some_path/file.mif",params);   FeatureType ft = mf.getSchema();   FeatureReader fr = mf.getFeatureReader();	   while (fr.hasNext()) {   	Feature in = fr.next();   	doSomethingWithFeature(in);   }   fr.close(); // closes file resources </code></pre><P><DT><B>Parameters:</B><DD><CODE>path</CODE> - Full pathName of the mif file, can be specified without the        .mif extension<DD><CODE>params</CODE> - Parameters map<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 the specified mif file could not be opened</DL><HR><A NAME="MIFFile(java.lang.String, org.geotools.feature.FeatureType, java.util.HashMap)"><!-- --></A><H3>MIFFile</H3><PRE>public <B>MIFFile</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;path,               <A HREF="../../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A>&nbsp;featureType,               <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html" title="class or interface in java.util">HashMap</A>&nbsp;params)        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/feature/SchemaException.html" title="class in org.geotools.feature">SchemaException</A></PRE><DL><DD><p> This constructor creates a a new MIF/MID file given schema and path.  If a .mif/.mid file pair already exists, it will be overwritten. </p>  <p> Basic usage: </p> <pre><code>   HashMap params = new HashMap();   params.put(MIFFile.MIFDataStore.HCLAUSE_COORDSYS, "Nonearth \"m\"");    MIFFile mf = new MIFFile("c:/some_path/", ft, params);  

⌨️ 快捷键说明

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