📄 rendererutilities.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../../org/geotools/geometry/jts/ReferencedEnvelope.html" title="class in org.geotools.geometry.jts">ReferencedEnvelope</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/RendererUtilities.html#createMapEnvelope(java.awt.Rectangle, java.awt.geom.AffineTransform, org.opengis.referencing.crs.CoordinateReferenceSystem)">createMapEnvelope</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">Rectangle</A> paintArea, <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> worldToScreen, CoordinateReferenceSystem crs)</CODE><BR> Creates the map's bounding box in real world coordinates <p/> NOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>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></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/RendererUtilities.html#worldToScreenTransform(com.vividsolutions.jts.geom.Envelope, java.awt.Rectangle)">worldToScreenTransform</A></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> 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> paintArea)</CODE><BR> <B>Deprecated.</B> <I>Uses the alternative based on <code>ReferencedEnvelope</code> that doe not assume anything on axes order.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>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></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/RendererUtilities.html#worldToScreenTransform(com.vividsolutions.jts.geom.Envelope, java.awt.Rectangle, org.opengis.referencing.crs.CoordinateReferenceSystem)">worldToScreenTransform</A></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> 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> paintArea, CoordinateReferenceSystem destinationCrs)</CODE><BR> This worldToScreenTransform method makes the assumption that the crs is in Lon,Lat or Lat,Lon. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>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></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/RendererUtilities.html#worldToScreenTransform(org.geotools.geometry.jts.ReferencedEnvelope, java.awt.Rectangle)">worldToScreenTransform</A></B>(<A HREF="../../../../org/geotools/geometry/jts/ReferencedEnvelope.html" title="class in org.geotools.geometry.jts">ReferencedEnvelope</A> 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> paintArea)</CODE><BR> Sets up the affine transform <p/> NOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds. </TD></TR></TABLE> <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> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ 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="worldToScreenTransform(com.vividsolutions.jts.geom.Envelope, java.awt.Rectangle)"><!-- --></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> 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> paintArea)</PRE><DL><DD><B>Deprecated.</B> <I>Uses the alternative based on <code>ReferencedEnvelope</code> that doe not assume anything on axes order.</I><P><DD>Sets up the affine transform <p/> ((Taken from the old LiteRenderer))<P><DD><DL><DT><B>Parameters:</B><DD><CODE>mapExtent</CODE> - the map extent<DD><CODE>paintArea</CODE> - the size of the rendering output area<DT><B>Returns:</B><DD>a transform that maps from real world coordinates to the screen</DL></DD></DL><HR><A NAME="worldToScreenTransform(org.geotools.geometry.jts.ReferencedEnvelope, java.awt.Rectangle)"><!-- --></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="../../../../org/geotools/geometry/jts/ReferencedEnvelope.html" title="class in org.geotools.geometry.jts">ReferencedEnvelope</A> 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> paintArea)</PRE><DL><DD>Sets up the affine transform <p/> NOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds. One reason is that WMS 1.1.1 does not follow it!!!<P><DD><DL><DT><B>Parameters:</B><DD><CODE>mapExtent</CODE> - the map extent<DD><CODE>paintArea</CODE> - the size of the rendering output area<DT><B>Returns:</B><DD>a transform that maps from real world coordinates to the screen</DL></DD></DL><HR><A NAME="createMapEnvelope(java.awt.Rectangle, java.awt.geom.AffineTransform)"><!-- --></A><H3>createMapEnvelope</H3><PRE>public static <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> <B>createMapEnvelope</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">Rectangle</A> paintArea, <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> worldToScreen) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/NoninvertibleTransformException.html" title="class or interface in java.awt.geom">NoninvertibleTransformException</A></PRE><DL><DD><B>Deprecated.</B> <I>Uses the alternative using a <code>CoordinateReferenceSystem</code> that doe not assume anything on axes order.</I><P><DD>Creates the map's bounding box in real world coordinates <p/> ((Taken from the old LiteRenderer))<P><DD><DL><DT><B>Parameters:</B><DD><CODE>worldToScreen</CODE> - a transform which converts World coordinates to screen pixel coordinates.<DD><CODE>paintArea</CODE> - the size of the rendering output area<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/NoninvertibleTransformException.html" title="class or interface in java.awt.geom">NoninvertibleTransformException</A></CODE></DL></DD></DL><HR><A NAME="createMapEnvelope(java.awt.Rectangle, java.awt.geom.AffineTransform, org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>createMapEnvelope</H3><PRE>public static <A HREF="../../../../org/geotools/geometry/jts/ReferencedEnvelope.html" title="class in org.geotools.geometry.jts">ReferencedEnvelope</A> <B>createMapEnvelope</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">Rectangle</A> paintArea, <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> worldToScreen, CoordinateReferenceSystem crs) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/NoninvertibleTransformException.html" title="class or interface in java.awt.geom">NoninvertibleTransformException</A></PRE><DL><DD>Creates the map's bounding box in real world coordinates <p/> NOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds. One reason is that WMS 1.1.1 does not follow it!!!<P><DD><DL><DT><B>Parameters:</B><DD><CODE>worldToScreen</CODE> - a transform which converts World coordinates to screen pixel coordinates.<DD><CODE>paintArea</CODE> - the size of the rendering output area<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/NoninvertibleTransformException.html" title="class or interface in java.awt.geom">NoninvertibleTransformException</A></CODE></DL></DD></DL><HR><A NAME="calculateScale(com.vividsolutions.jts.geom.Envelope, org.opengis.referencing.crs.CoordinateReferenceSystem, int, int, double)"><!-- --></A><H3>calculateScale</H3><PRE>public static double <B>calculateScale</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> envelope, CoordinateReferenceSystem coordinateReferenceSystem, int imageWidth, int imageHeight, double DPI) throws TransformException, FactoryException</PRE><DL><DD><B>Deprecated.</B> <I></I> <P><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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -