Steve,<br><br>As far as I can see, your preference is to implement the clustering within the same layer instead of referring to another layer, right?<br>(With regards to the parameters there's not too much difference in the concept with having processing options vs. built in parameters.)<br>
<br>With this end in view, I foresee 2 main problems which is not quite trivial in this approach.<br><br>1. How the FeatureCount parameter will be used for labelling the clustered features?<br>2. How can we make the clustered features selectable (queryable). / this is not a strong requirement of mine at this phase /<br>
<br><br>With regards to the implementation how about invoking a custom LayerOpen in msDrawVectorLayer, something like?:<br><br>if (needtocluster) // based of the existence of the cluster parameters<br> msClusterLayerOpen(layer); // this would override the vtable methods: LayerGetItems/LayerInitIteminfo/LayerWhichShapes/LayerNextShape<br>
else<br> mslayerOpen(layer);<br><br>// the remaining code would be the same in effect (not modified)<br><br>msLayerWhichItems(layer); // LayerGetItems/LayerInitIteminfo would be aware of the FeatureCount parameter.<br>
msLayerWhichShapes(layer, rect) // build up the cluster database here, call WhichItems/LayerWhichShapes/LayerNextShape for the underlying connection type<br>while(msLayerNextShape(layer, shape) == MS_SUCCESS) // shapes would be served from the cluster database<br>
{<br>
msDrawShape(shape); // normal drawing process <br>
}<br>msLayerClose(layer); // restore the original vtable<br><br><br><br>Best regards,<br><br>Tamas<br><br><br><br><br><div class="gmail_quote">2011/2/15 Lime, Steve D (DNR) <span dir="ltr"><<a href="mailto:Steve.Lime@state.mn.us" target="_blank">Steve.Lime@state.mn.us</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Sorry, I mean clustering shouldn’t be a new connection type, rather a block or optionally a set of processing directives, so:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">LAYER</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> NAME mypoints</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> TYPE POINT</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> # whatever data and/or connection params</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> CLUSTERS # or processing directives</span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> END</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> # class and style info</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);">END</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">The decision to use a block or processing directives would depend on the complexity of configuration. If clustering could</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">potentially support lots of tuning then I’d favor an explicit configuration block.</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">I think both pieces of functionality outlined are potentially useful. I’d recommend limiting the scope of the RFC to clustering </span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);">to start with… There is some limited (and non-configurable) support for not labeling over point features already present in</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">the label cache code so I see more limited utility in the layer combination portion of the RFC.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Steve</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;"><p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Tamas Szekeres<br>
<b>Sent:</b> Tuesday, February 15, 2011 11:38 AM<br><b>To:</b> Lime, Steve D (DNR)<br><b>Cc:</b> <a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br><b>Subject:</b> Re: [mapserver-dev] MS RFC 68: Support for combining features from multiple layers (Call for discussion)</span></p>
</div><div><div></div><div><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom: 12pt;"> </p><div><p class="MsoNormal">2011/2/15 Lime, Steve D (DNR) <<a href="mailto:Steve.Lime@state.mn.us" target="_blank">Steve.Lime@state.mn.us</a>></p>
<div><div><p class="MsoNormal"> </p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">I see value in both but kinda think they should be handled with separate RFCs since you don’t need one for the</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">other and neither problem is trivial.</span></p></div></div><div><p class="MsoNormal" style="margin-bottom: 12pt;"><br>Steve,<br><br>I can accept to create separate RFCs (however I require them both in my project to succeed ;-)</p>
</div><blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;">
<div><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">At least on the clustering side I don’t think that should be handled as a connection type. Rather I’d favor a new</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">CLUSTER block where you’d set the various tolerance and scale values. That way you could add clustering to a</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">point layer without much effort. I think it needs to be that simple.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p></div></div></blockquote><div><p class="MsoNormal" style="margin-bottom: 12pt;"><br>I don't see the difference with regards to the data processing. For the setting of the parameters via a CLUSTER block instead of some PROCESSING option doesn't seem to differ significantly. But if you want to include this algorithm somewhere into the MapServer core that would be another case.<br>
<br>Best regards,<br><br>Tamas</p></div></div><p class="MsoNormal"> </p></div></div></div></div></blockquote></div><br><div style="padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;">
</div>
<div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>