<html>
  <head>
    <style type="text/css">
      <!--
        body { margin-top: 4px; margin-right: 4px; margin-left: 4px; font-variant: normal; margin-bottom: 1px; line-height: normal }
        p { margin-top: 0; margin-bottom: 0 }
      -->
    </style>
    
  </head>
  <body style="margin-top: 4px; margin-right: 4px; margin-left: 4px; margin-bottom: 1px">
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Comic Sans MS" size="3">All&#44;</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Comic Sans MS" size="3">Just to mix it up a little&#44; what about doing a half and half approach. &nbsp;MapServer could generate something simpler &#40;the data basics from a data read on the fly&#44; and return a simple ramping config file&#44; which could be used to pass back as a &nbsp;file for the custom aspects.</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Comic Sans MS" size="3">Just having these two options would open up some doors&#44; MapServer returning a simple ramp structure as a file&#44; could be used in a User interface to do more complicated theming for example. &nbsp;Once the basic data limits are known&#44; the ramping divisions are much easier to decide on.</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Comic Sans MS" size="3">Could this work as a compiled in module for those that need/want it instead of always in&#63; or would it make more sense to build in&#44; &#63;&#63; Something similar to a mode&#61;legend sort of thing&#44; like mode&#61;ramp_txt &#63;&#63;</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font face="Comic Sans MS" size="3">bobb</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <br>
      <br>
      &gt;&gt;&gt; &quot;Lime&#44; Steve D &#40;DNR&#41;&quot; &lt;Steve.Lime@state.mn.us&gt; wrote:<br>    </p>
    <div style="background-color: #f3f3f3; border-left: solid 1px #050505; margin-top: 0; padding-left: 7px; margin-left: 15px; margin-right: 0; margin-bottom: 0">
      <p style="margin-bottom: 0; margin-top: 0">
        At one point I toyed with the idea of supporting a .stats file for a layer and supplying a routine &#40;command-line&#41; that would populate it. The file would contain data like you&#39;re talking about. Doesn&#39;t help with the on-the-fly needs Bart was articulating.<br><br>Steve<br><br>-----Original Message-----<br>From: mapserver-users-bounces@lists.osgeo.org &#91;mailto:mapserver-users-bounces@lists.osgeo.org&#93; On Behalf Of Stephen Woodbridge<br>Sent: Wednesday&#44; February 03&#44; 2010 10:39 AM<br>To: Jan Hartmann<br>Cc: Lime&#44; Steve D &#40;DNR&#41;&#59; MapServer Dev Mailing List&#59; mapserver-users@lists.osgeo.org<br>Subject: Re: &#91;mapserver-dev&#93; RE: &#91;mapserver-users&#93; colorramp and datarange on the fly&#63;<br><br>Right&#44; I think there are two use cases:<br><br>1&#41; data exploration&#160;&#160;&nbsp;- can be slower but needs flexibility<br>2&#41; production serving - needs to be fast&#44; and probably limits<br>flexibility to some predefined models<br><br>I think that there is also another angle to this&#44; which is how the<br>summary data is computed for example:<br><br>1&#41; min/max/average/std<br>2&#41; statistical analysis<br>3&#41; binning into some number of classes<br>4&#41; removing outliers so the results are not skewed by them<br>5&#41; etc<br><br>There are a lot of ways the people might need to summarize they data.<br><br>If the data is in a database&#44; then you can add all the analysis&#44; slicing<br>and dicing to the database and the rendering to mapserver.<br><br>So&#44; I think that it would be nice to be able to read some &quot;metadata&quot;<br>about a layer and then use that for building the display using something<br>like colorramp and datarange. We might want to look at ways that we<br>could establish in mapserver for fetching the &quot;metadata&quot; about a layer.<br>For example:<br><br>1&#41; define the &quot;metadata&quot; in the METADATA object<br>2&#41; define a .met file for a shapefile or tileindex that contained the<br>&quot;metadata&quot; for that layer<br>3&#41; define a separate SQL query that could be used to fetch the<br>&quot;metadata&quot; for the layer<br>4&#41; something similar for other layer providers.<br>5&#41; scan the data in two passes to compute some simple &quot;metadata&quot;<br><br>Thoughts&#63;<br><br>-Steve W<br><br><br>Jan Hartmann wrote:<br>&gt; If you allow two passes&#44; you can have all sorts of summarized values in<br>&gt; the template&#44; to be used in the second pass&#44; like Bart&#39;s actual extent<br>&gt; used for coloring. Doesn&#39;t look to difficult to implement to me&#44; as long<br>&gt; as the two passes only get called when really necessary. I&#39;m not sure if<br>&gt; performance is an issue for MapServer itself: if you really want high<br>&gt; performance&#44; you should use the underlying format or database directly.<br>&gt;<br>&gt; Jan<br>&gt;<br>&gt; On 3-2-2010 17:02&#44; Lime&#44; Steve D &#40;DNR&#41; wrote:<br>&gt;&gt; How big a change would depend on the implementation. The brute force<br>&gt;&gt; approach where you simply loop through features once to compute ranges<br>&gt;&gt; and then again to draw would be probably pretty straight forward and<br>&gt;&gt; driver independent. Wouldn&#39;t be fast &#40;but would be simple&#41;. Complexity<br>&gt;&gt; would be added as you try and boost performance by:<br>&gt;&gt;<br>&gt;&gt;&#160;&#160;&#160;&nbsp;- allowing drivers to compute stats in their own way &#40;e.g. add to<br>&gt;&gt; the layer API something like msLayerGetStats&#40;...&#41;&#41;<br>&gt;&gt;&#160;&#160;&#160;&nbsp;- caching geometries from a first pass through the shapes for the<br>&gt;&gt; second<br>&gt;&gt;<br>&gt;&gt; Steve<br>&gt;&gt;<br>&gt;&gt; BTW The color ramp support needs to be cleaned up first. I think we<br>&gt;&gt; scared the originator of that code away when an RFC was originally put<br>&gt;&gt; together.<br>&gt;&gt;<br>&gt;&gt; -----Original Message-----<br>&gt;&gt; From: mapserver-users-bounces@lists.osgeo.org<br>&gt;&gt; &#91;mailto:mapserver-users-bounces@lists.osgeo.org&#93; On Behalf Of Bart van<br>&gt;&gt; den Eijnden<br>&gt;&gt; Sent: Wednesday&#44; February 03&#44; 2010 5:12 AM<br>&gt;&gt; To: mapserver-users@lists.osgeo.org<br>&gt;&gt; Subject: &#91;mapserver-users&#93; colorramp and datarange on the fly&#63;<br>&gt;&gt;<br>&gt;&gt; Hi list&#44;<br>&gt;&gt;<br>&gt;&gt; is it possible to have a colorramp in Mapserver based on the min and<br>&gt;&gt; max value in the current extent&#63;<br>&gt;&gt;<br>&gt;&gt; So instead of predefining the min and max in DATARANGE&#44; have Mapserver<br>&gt;&gt; use the min and max value of the dataset in the current extent&#63;<br>&gt;&gt;<br>&gt;&gt; If not&#44; would it be an easy change or a very complex one&#63;<br>&gt;&gt;<br>&gt;&gt; Best regards&#44;<br>&gt;&gt; Bart_______________________________________________<br>&gt;&gt; mapserver-users mailing list<br>&gt;&gt; mapserver-users@lists.osgeo.org<br>&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-users<br>&gt;&gt; _______________________________________________<br>&gt;&gt; mapserver-dev mailing list<br>&gt;&gt; mapserver-dev@lists.osgeo.org<br>&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-dev<br>&gt;&gt;&#160;&#160;&#160;<br>&gt; _______________________________________________<br>&gt; mapserver-dev mailing list<br>&gt; mapserver-dev@lists.osgeo.org<br>&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-dev<br><br>_______________________________________________<br>mapserver-users mailing list<br>mapserver-users@lists.osgeo.org<br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-users<br>_______________________________________________<br>mapserver-dev mailing list<br>mapserver-dev@lists.osgeo.org<br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-dev<br>
      </p>
    </div>
  </body>
</html>