gridtoenvelopemapper.html

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

HTML
798
字号
<!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:21 GMT-05:00 2007 --><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>GridToEnvelopeMapper (Geotools 2.3.x 2.3.2 API)</TITLE><META NAME="keywords" CONTENT="org.geotools.referencing.operation.builder.GridToEnvelopeMapper class"><META NAME="keywords" CONTENT="SWAP_XY"><META NAME="keywords" CONTENT="REVERSE_AXIS"><META NAME="keywords" CONTENT="getGridType()"><META NAME="keywords" CONTENT="setGridType()"><META NAME="keywords" CONTENT="getGridRange()"><META NAME="keywords" CONTENT="setGridRange()"><META NAME="keywords" CONTENT="getEnvelope()"><META NAME="keywords" CONTENT="setEnvelope()"><META NAME="keywords" CONTENT="swapXY()"><META NAME="keywords" CONTENT="getSwapXY()"><META NAME="keywords" CONTENT="setSwapXY()"><META NAME="keywords" CONTENT="getReverseAxis()"><META NAME="keywords" CONTENT="setReverseAxis()"><META NAME="keywords" CONTENT="reverseAxis()"><META NAME="keywords" CONTENT="isAutomatic()"><META NAME="keywords" CONTENT="setAutomatic()"><META NAME="keywords" CONTENT="createTransform()"><META NAME="keywords" CONTENT="createAffineTransform()"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="GridToEnvelopeMapper (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/GridToEnvelopeMapper.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;PREV CLASS&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="GridToEnvelopeMapper.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="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></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.referencing.operation.builder</FONT><BR>Class GridToEnvelopeMapper</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"><B>GridToEnvelopeMapper</B></PRE><HR><DL><DT>public class <B>GridToEnvelopeMapper</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL><P>A helper class for building <var>n</var>-dimensional <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/AffineTransform.html" title="class or interface in java.awt.geom">affine transform</A> mapping grid ranges to envelopes. The affine transform will be computed automatically from the information specified by the <A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#setGridRange(org.opengis.coverage.grid.GridRange)"><CODE>setGridRange</CODE></A> and <A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#setEnvelope(org.opengis.spatialschema.geometry.Envelope)"><CODE>setEnvelope</CODE></A> methods, which are mandatory. All other setter methods are optional hints about the affine transform to be created. This builder is convenient when the following conditions are meet: <p> <ul>   <li><p>Pixels coordinates (usually (<var>x</var>,<var>y</var>) integer values inside       the rectangle specified by the grid range) are expressed in some       coordinate reference system known at compile       time. This is often the case. For example the CRS attached to <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/BufferedImage.html" title="class or interface in java.awt.image"><CODE>BufferedImage</CODE></A>       has always (column,       row) axis, with the origin (0,0) in the upper       left corner, and row values increasing down.</p></li>   <li><p>"Real world" coordinates (inside the envelope) are expressed in arbitrary       <em>horizontal</em> coordinate reference system. Axis directions may be       (North, West),       or (East, North),       <cite>etc.</cite>.</p></li> </ul> <p> In such case (and assuming that the image's CRS has the same characteristics than the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/BufferedImage.html" title="class or interface in java.awt.image"><CODE>BufferedImage</CODE></A>'s CRS described above): <p> <ul>   <li><p><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#setSwapXY(boolean)"><CODE>swapXY</CODE></A> shall be set to  if the "real world" axis       order is (North, East)       instead of (East, North).       This axis swapping is necessary for mapping the (column, row) axis order associated to the       image CRS.</p></li>   <li><p>In addition, the "real world" axis directions shall be reversed (by invoking       <code><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#reverseAxis(int)">reverseAxis</A>(dimension)</code>) if their direction is       <CODE>WEST</CODE> (<var>x</var> axis) or <CODE>NORTH</CODE>       (<var>y</var> axis), in order to get them oriented toward the <CODE>EAST</CODE> or <CODE>SOUTH</CODE> direction respectively. The later may seems       unatural, but it reflects the fact that row values are increasing down in an       <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/BufferedImage.html" title="class or interface in java.awt.image"><CODE>BufferedImage</CODE></A>'s CRS.</p></li> </ul><P><P><DL><DT><B>Since:</B></DT>  <DD>2.3</DD><DT><B>Author:</B></DT>  <DD>Martin Desruisseaux</DD><DT><B>Module:</B></DT><DD><CODE><B>module/referencing</B></CODE> &nbsp; (<A HREF="http://maven.geotools.fr/repository/org/geotools/gt2-referencing/"><CODE>gt2-referencing.jar</CODE></A>) (<A HREF="http://maven.geotools.fr/reports/referencing/index.html">Maven report</A>) (<A HREF="http://svn.geotools.org/geotools/tags/2.3.2/module/referencing/src/org/geotools/referencing/operation/builder/GridToEnvelopeMapper.java">SVN head</A>)</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#REVERSE_AXIS">REVERSE_AXIS</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A bit mask for the <A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#setReverseAxis(boolean[])"><CODE>reverseAxis</CODE></A> property.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#SWAP_XY">SWAP_XY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A bit mask for the <A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#setSwapXY(boolean)"><CODE>swapXY</CODE></A> property.</TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#GridToEnvelopeMapper()">GridToEnvelopeMapper</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance of .</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#GridToEnvelopeMapper(org.opengis.coverage.grid.GridRange, org.opengis.spatialschema.geometry.Envelope)">GridToEnvelopeMapper</A></B>(GridRange&nbsp;gridRange,                     Envelope&nbsp;userRange)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance for the specified grid range and envelope.</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>&nbsp;<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></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#createAffineTransform()">createAffineTransform</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the math transform as a two-dimensional affine transform.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;MathTransform</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#createTransform()">createTransform</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a math transform using the information provided by setter methods.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;Envelope</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#getEnvelope()">getEnvelope</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the envelope. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;GridRange</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#getGridRange()">getGridRange</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the grid range.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;PixelInCell</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/geotools/referencing/operation/builder/GridToEnvelopeMapper.html#getGridType()">getGridType</A></B>()</CODE>

⌨️ 快捷键说明

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