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

📄 rendererutilities.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 coordinate space should be used directly without compensating for distortions in it with respect to the shape of the real Earth.  NOTE: we are actually doing a a much more exact calculation, and accounting for non-square pixels (which are allowed in WMS) ADDITIONAL NOTE from simboss: I added soe minor fixes. See below.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>envelope</CODE> - <DD><CODE>coordinateReferenceSystem</CODE> - <DD><CODE>imageWidth</CODE> - <DD><CODE>imageHeight</CODE> - <DD><CODE>DPI</CODE> - screen dots per inch (OGC standard is 90)<DT><B>Throws:</B><DD><CODE>TransformException</CODE><DD><CODE>FactoryException</CODE></DL></DD></DL><HR><A NAME="calculateOGCScale(org.geotools.geometry.jts.ReferencedEnvelope, int, java.util.Map)"><!-- --></A><H3>calculateOGCScale</H3><PRE>public static double <B>calculateOGCScale</B>(<A HREF="../../../../org/geotools/geometry/jts/ReferencedEnvelope.html" title="class in org.geotools.geometry.jts">ReferencedEnvelope</A>&nbsp;envelope,                                       int&nbsp;imageWidth,                                       <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;hints)</PRE><DL><DD>This method performs the computation using the methods suggested by the OGC SLD specification, page 26.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>envelope</CODE> - <DD><CODE>imageWidth</CODE> - <DT><B>Returns:</B><DD></DL></DD></DL><HR><A NAME="calculateScale(org.geotools.geometry.jts.ReferencedEnvelope, int, int, java.util.Map)"><!-- --></A><H3>calculateScale</H3><PRE>public static double <B>calculateScale</B>(<A HREF="../../../../org/geotools/geometry/jts/ReferencedEnvelope.html" title="class in org.geotools.geometry.jts">ReferencedEnvelope</A>&nbsp;envelope,                                    int&nbsp;imageWidth,                                    int&nbsp;imageHeight,                                    <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;hints)                             throws TransformException,                                    FactoryException</PRE><DL><DD>First searches the hints for the scale denominator hint otherwise calls  <A HREF="../../../../org/geotools/renderer/lite/RendererUtilities.html#calculateScale(com.vividsolutions.jts.geom.Envelope, org.opengis.referencing.crs.CoordinateReferenceSystem, int, int, double)"><CODE>calculateScale(Envelope, CoordinateReferenceSystem, int, int, double)</CODE></A>.  If the hints contains a DPI then that DPI is used otherwise 90 is used (the OGS default).<P><DD><DL><DT><B>Throws:</B><DD><CODE>TransformException</CODE><DD><CODE>FactoryException</CODE></DL></DD></DL><HR><A NAME="calculateScale(org.geotools.geometry.jts.ReferencedEnvelope, int, int, double)"><!-- --></A><H3>calculateScale</H3><PRE>public static double <B>calculateScale</B>(<A HREF="../../../../org/geotools/geometry/jts/ReferencedEnvelope.html" title="class in org.geotools.geometry.jts">ReferencedEnvelope</A>&nbsp;envelope,                                    int&nbsp;imageWidth,                                    int&nbsp;imageHeight,                                    double&nbsp;DPI)                             throws TransformException,                                    FactoryException</PRE><DL><DD>Find the scale denominator of the map. Method: 1. find the diagonal distance (meters) 2. find the diagonal distance (pixels) 3. find the diagonal distance (meters) -- use DPI 4. calculate scale (#1/#2)  NOTE: return the scale denominator not the actual scale (1/scale = denominator)  TODO: (SLD spec page 28): Since it is common to integrate the output of multiple servers into a single displayed result in the web-mapping environment, it is important that different map servers have consistent behaviour with respect to processing scales, so that all of the independent servers will select or deselect rules at the same scales. To insure consistent behaviour, scales relative to coordinate spaces must be handled consistently between map servers. For geographic coordinate systems, which use angular units, the angular coverage of a map should be converted to linear units for computation of scale by using the circumference of the Earth at the equator and by assuming perfectly square linear units. For linear coordinate systems, the size of the coordinate space should be used directly without compensating for distortions in it with respect to the shape of the real Earth.  NOTE: we are actually doing a a much more exact calculation, and accounting for non-square pixels (which are allowed in WMS) ADDITIONAL NOTE from simboss: I added soe minor fixes. See below.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>envelope</CODE> - <DD><CODE>imageWidth</CODE> - <DD><CODE>imageHeight</CODE> - <DD><CODE>DPI</CODE> - screen dots per inch (OGC standard is 90)   TODO should I take into account also the destination CRS? Otherwise I am just assuming that the final crs is lon,lat that is it maps lon to x (n raster space) and lat to y (in raster space).<DT><B>Throws:</B><DD><CODE>TransformException</CODE><DD><CODE>FactoryException</CODE></DL></DD></DL><HR><A NAME="worldToScreenTransform(com.vividsolutions.jts.geom.Envelope, java.awt.Rectangle, org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>worldToScreenTransform</H3><PRE>public static <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> <B>worldToScreenTransform</B>(<A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Envelope.html" title="class or interface in com.vividsolutions.jts.geom">Envelope</A>&nbsp;mapExtent,                                                     <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">Rectangle</A>&nbsp;paintArea,                                                     CoordinateReferenceSystem&nbsp;destinationCrs)</PRE><DL><DD>This worldToScreenTransform method makes the assumption that the crs is in Lon,Lat or Lat,Lon. If the provided envelope does not carry along a crs the assumption that the map extent is in the classic Lon,Lat form. In case the provided envelope is of type.  Note that this method takes into account also the OGC standard with respect to the relation between pixels and sample.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>mapExtent</CODE> - The envelope of the map in lon,lat<DD><CODE>paintArea</CODE> - The area to paint as a rectangle<DD><CODE>destinationCrs</CODE> - </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>&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/RendererUtilities.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/renderer/lite/PolygonIterator.html" title="class in org.geotools.renderer.lite"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/geotools/renderer/lite/StreamingRenderer.html" title="class in org.geotools.renderer.lite"><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="RendererUtilities.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright &copy; 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 + -