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

📄 labelcachedefault.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/MultiPolygon.html" title="class or interface in com.vividsolutions.jts.geom">MultiPolygon</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#clipPolygon(com.vividsolutions.jts.geom.Polygon, com.vividsolutions.jts.geom.Polygon, com.vividsolutions.jts.geom.Envelope)">clipPolygon</A></B>(<A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Polygon.html" title="class or interface in com.vividsolutions.jts.geom">Polygon</A>&nbsp;poly,            <A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Polygon.html" title="class or interface in com.vividsolutions.jts.geom">Polygon</A>&nbsp;bbox,            <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;displayGeomEnv)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try to do a more robust way of clipping a polygon to a bounding box. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#end(java.awt.Graphics2D, java.awt.Rectangle)">end</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">Graphics2D</A>&nbsp;graphics,    <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;displayArea)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called to indicate that the map is done rendering.  </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#endLayer(java.awt.Graphics2D, java.awt.Rectangle)">endLayer</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">Graphics2D</A>&nbsp;graphics,         <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;displayArea)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called to indicate that a layer is done rendering.  </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/LineString.html" title="class or interface in com.vividsolutions.jts.geom">LineString</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#getLongest(java.util.ArrayList)">getLongest</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A>&nbsp;al)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#getPriority(org.geotools.styling.TextSymbolizer, org.geotools.feature.Feature)">getPriority</A></B>(<A HREF="../../../../org/geotools/styling/TextSymbolizer.html" title="interface in org.geotools.styling">TextSymbolizer</A>&nbsp;symbolizer,            <A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A>&nbsp;feature)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get the priority from the symbolizer its an expression, so it will try to evaluate it: 1. if its missing --> DEFAULT_PRIORITY 2. if its a number, return that number 3. if its not a number, convert to string and try to parse the number; return the number 4. otherwise, return DEFAULT_PRIORITY</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/util/List.html" title="class or interface in java.util">List</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#orderedLabels()">orderedLabels</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return a list with all the values in priority order. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#processNodes(java.util.List, java.util.Hashtable, java.util.ArrayList)">processNodes</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&nbsp;edges,             <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Hashtable.html" title="class or interface in java.util">Hashtable</A>&nbsp;nodes,             <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A>&nbsp;result)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pull a line from the list, and: 1. if nothing connects to it (its issolated), add it to "result" 2. otherwise, merge it at the start/end with the LONGEST line there. 3. remove the original line, and the lines it merged with from the hashtables 4. go again, with the merged line</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#put(org.geotools.styling.TextSymbolizer, org.geotools.feature.Feature, org.geotools.renderer.lite.LiteShape2, javax.media.jai.util.Range)">put</A></B>(<A HREF="../../../../org/geotools/styling/TextSymbolizer.html" title="interface in org.geotools.styling">TextSymbolizer</A>&nbsp;symbolizer,    <A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A>&nbsp;feature,    <A HREF="../../../../org/geotools/renderer/lite/LiteShape2.html" title="class in org.geotools.renderer.lite">LiteShape2</A>&nbsp;shape,    <A HREF="http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/util/Range.html" title="class or interface in javax.media.jai.util">Range</A>&nbsp;scaleRange)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Puts a TextStyle and its associated shape in the cache.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#putInNodeHash(com.vividsolutions.jts.geom.LineString, java.util.Hashtable)">putInNodeHash</A></B>(<A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/LineString.html" title="class or interface in com.vividsolutions.jts.geom">LineString</A>&nbsp;ls,              <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Hashtable.html" title="class or interface in java.util">Hashtable</A>&nbsp;nodes)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#removeFromHash(java.util.Hashtable, com.vividsolutions.jts.geom.LineString)">removeFromHash</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Hashtable.html" title="class or interface in java.util">Hashtable</A>&nbsp;nodes,               <A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/LineString.html" title="class or interface in com.vividsolutions.jts.geom">LineString</A>&nbsp;ls)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#start()">start</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by renderer to indicate that the rendering process is starting.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#startLayer()">startLayer</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by renderer to indication the start of rendering a layer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/renderer/lite/LabelCacheDefault.html#stop()">stop</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells the cache to stop labelling.</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="MIN_GOODNESS_FIT"><!-- --></A><H3>MIN_GOODNESS_FIT</H3><PRE>public double <B>MIN_GOODNESS_FIT</B></PRE><DL><DD>labels that arent this good will not be shown<P><DL></DL></DL><HR><A NAME="DEFAULT_PRIORITY"><!-- --></A><H3>DEFAULT_PRIORITY</H3><PRE>public double <B>DEFAULT_PRIORITY</B></PRE><DL><DL></DL></DL><HR><A NAME="labelCache"><!-- --></A><H3>labelCache</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> <B>labelCache</B></PRE><DL><DD>Map<label, LabelCacheItem> the label cache<P><DL></DL></DL><HR><A NAME="labelCacheNonGrouped"><!-- --></A><H3>labelCacheNonGrouped</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/ArrayList.html" title="class or interface in java.util">ArrayList</A> <B>labelCacheNonGrouped</B></PRE><DL><DD>non-grouped labels get thrown in here*<P><DL></DL></DL><HR><A NAME="DEFAULT_GROUP"><!-- --></A><H3>DEFAULT_GROUP</H3><PRE>public boolean <B>DEFAULT_GROUP</B></PRE><DL><DL></DL></DL><HR><A NAME="DEFAULT_SPACEAROUND"><!-- --></A><H3>DEFAULT_SPACEAROUND</H3><PRE>public int <B>DEFAULT_SPACEAROUND</B></PRE><DL><DL></DL></DL><HR><A NAME="styleFactory"><!-- --></A><H3>styleFactory</H3><PRE>protected <A HREF="../../../../org/geotools/renderer/style/SLDStyleFactory.html" title="class in org.geotools.renderer.style">SLDStyleFactory</A> <B>styleFactory</B></PRE><DL><DL></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="LabelCacheDefault()"><!-- --></A><H3>LabelCacheDefault</H3><PRE>public <B>LabelCacheDefault</B>()</PRE><DL></DL><!-- ============ 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="stop()"><!-- --></A><H3>stop</H3><PRE>public void <B>stop</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/renderer/lite/LabelCache.html" title="interface in org.geotools.renderer.lite">LabelCache</A></CODE></B></DD><DD>Tells the cache to stop labelling.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/renderer/lite/LabelCache.html#stop()">stop</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/renderer/lite/LabelCache.html" title="interface in org.geotools.renderer.lite">LabelCache</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="start()"><!-- --></A><H3>start</H3><PRE>public void <B>start</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/renderer/lite/LabelCache.html" title="interface in org.geotools.renderer.lite">LabelCache</A></CODE></B></DD><DD>Called by renderer to indicate that the rendering process is starting.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/renderer/lite/LabelCache.html#start()">start</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/renderer/lite/LabelCache.html" title="interface in org.geotools.renderer.lite">LabelCache</A></CODE></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/renderer/lite/LabelCache.html#start()"><CODE>LabelCache.start()</CODE></A></DL></DD></DL><HR><A NAME="startLayer()"><!-- --></A><H3>startLayer</H3>

⌨️ 快捷键说明

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