geotiffwriteparams.html

来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 341 行 · 第 1/2 页

HTML
341
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_13) on Tue Jun 05 11:36:36 GMT-05:00 2007 --><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>GeoTiffWriteParams (Geotools 2.3.x 2.3.2 API)</TITLE><META NAME="keywords" CONTENT="org.geotools.gce.geotiff.GeoTiffWriteParams class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="GeoTiffWriteParams (Geotools 2.3.x 2.3.2 API)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GeoTiffWriteParams.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/geotools/gce/geotiff/GeoTiffReader.html" title="class in org.geotools.gce.geotiff"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/geotools/gce/geotiff/GeoTiffWriter.html" title="class in org.geotools.gce.geotiff"><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>  &nbsp;&nbsp;<A HREF="GeoTiffWriteParams.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_GeoToolsWriteParams">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_GeoToolsWriteParams">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.geotools.gce.geotiff</FONT><BR>Class GeoTiffWriteParams</H2><PRE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/imageio/IIOParam.html" title="class or interface in javax.imageio">IIOParam</A>      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/imageio/ImageWriteParam.html" title="class or interface in javax.imageio">ImageWriteParam</A>          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../org/geotools/image/imageio/GeoToolsWriteParams.html" title="class in org.geotools.image.imageio">GeoToolsWriteParams</A>              <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>GeoTiffWriteParams</B></PRE><HR><DL><DT>public final class <B>GeoTiffWriteParams</B><DT>extends <A HREF="../../../../org/geotools/image/imageio/GeoToolsWriteParams.html" title="class in org.geotools.image.imageio">GeoToolsWriteParams</A></DL><P>Subclass of <A HREF="../../../../org/geotools/image/imageio/GeoToolsWriteParams.html" title="class in org.geotools.image.imageio"><CODE>GeoToolsWriteParams</CODE></A> the allows the user to specify parameters to control the process of writing out a GeoTiff file through standards <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/imageio/ImageWriteParam.html" title="class or interface in javax.imageio"><CODE>ImageWriteParam</CODE></A> (with possible extensions).  <p> This class allows the user to control the output tile size for the GeoTiff file we are going to create as well as the possible compression.  <p> An example of usage of this parameters is as follows:  <pre> <code>       		//getting a format       		final GeoTiffFormat format = new GeoTiffFormat();             		//getting the write parameters       		final GeoTiffWriteParams wp = new GeoTiffWriteParams();       		       		//setting compression to LZW       		wp.setCompressionMode(GeoTiffWriteParams.MODE_EXPLICIT);       		wp.setCompressionType(&quot;LZW&quot;);       		wp.setCompressionQuality(0.75F);       		       		//setting the tile size to 256X256       		wp.setTilingMode(GeoToolsWriteParams.MODE_EXPLICIT);       		wp.setTiling(256, 256);              		//setting the write parameters for this geotiff       		final ParameterValueGroup params = format.getWriteParameters();       		params.parameter(       				AbstractGridFormat.GEOTOOLS_WRITE_PARAMS.getName().toString())       				.setValue(wp);              		//get a reader to the input File       		GridCoverageReader reader = new GeoTiffReader(inFile, null);       		GridCoverageWriter writer = null;       		GridCoverage2D gc = null;       		if (reader != null) {              			// reading the coverage       			gc = (GridCoverage2D) reader.read(null);   				if (gc != null) {       					final File writeFile = new File(new StringBuffer(writedir       							.getAbsolutePath()).append(File.separatorChar)       							.append(gc.getName().toString()).append(&quot;.tiff&quot;)       							.toString());       					writer = format.getWriter(writeFile);       					writer.write(gc, (GeneralParameterValue[]) params.values()        			.toArray(new GeneralParameterValue[1]));        		} </code> </pre><P><P><DL><DT><B>Since:</B></DT>  <DD>2.3.x</DD><DT><B>Author:</B></DT>  <DD>Simone Giannecchini</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A>

⌨️ 快捷键说明

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