Hi Steve,<br><br>Please find my comments inline below.<br><br><br><div class="gmail_quote">2011/2/16 Lime, Steve D (DNR) <span dir="ltr">&lt;<a href="mailto:Steve.Lime@state.mn.us">Steve.Lime@state.mn.us</a>&gt;</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);">Actually the clustering could be extended to multiple layers using the second part of your RFC. You’d just embed the clustering block/params</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">in a layer that references other layers (however that would work). That’s kinda why I thought the RFCs should be separate.</span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p></div></div></blockquote><div><br><br>I agree with the statements above, absolutely.<br><br> </div><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);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">The feature count parameter would be a challenge regardless of implementation.  I need to think about this a bit. I was thinking that if a layer </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">is to be clustered then:</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p style="margin-left: 22.5pt;">
<span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font: 7pt &quot;Times New Roman&quot;;">          </span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">msLayerGetItems() would tag on a this new item in addition to whatever the layer defines</span></p>
<p style="margin-left: 22.5pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font: 7pt &quot;Times New Roman&quot;;">          </span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);"> the clustering operation would populate it</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);">Being able to extend a layers default item set and then populating it at the shape level is a need we have not only in this case. The 3D buildings</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">idea thrown out on mapserver-users also would use this. We should consider an general approach to that topic.</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);">Again, let me think just a touch on this and reply back. Ideally we should only have to override the vtable function for msLayerNextShape(). I’m</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">thinking:</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p style="margin-left: 22.5pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font: 7pt &quot;Times New Roman&quot;;">          </span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">msLayerOpen() is unchanged</span></p>
<p style="margin-left: 22.5pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font: 7pt &quot;Times New Roman&quot;;">          </span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">msLayerGetItems() is smart enough to add the new item for feature count</span></p>
<p style="margin-left: 22.5pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font: 7pt &quot;Times New Roman&quot;;">          </span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">msClusterLayer() is a new function, it uses the stock msLayerNextShape() function to read shapes and build clusters, the feature count is maintained here.</span></p>
<p style="margin-left: 22.5pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font: 7pt &quot;Times New Roman&quot;;">          </span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">msLayerNextShape() is overridden to access the cluster cache</span></p>
<p style="margin-left: 22.5pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span style="font: 7pt &quot;Times New Roman&quot;;">          </span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">msLayerWhichShapes() is unchanged</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p></div></div></blockquote><div><br>I would be in favour of writing the code (in mapcluster.c) in such way which could provide the clustering in the builtin approach (you mention) and it could eventially be a driver (ie a builtin or a plugin) as well. This would leave the decision up to the user whether to support the query or just to use this for rendering purposes. In this case using a custom version of msClusterLayerOpen (being called from msDrawLayer) would be quite straightforward to implement. msClusterLayerOpen could do any vtable adjustments as required for the driver.<br>
<br> </div><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);">This would then require almost no change to existing code… You could use the inline feature list already present in a layerObj to store the clustered</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Shapes. Of course then you couldn’t cluster inline shapes but perhaps that’s not a big deal (wouldn’t think it would be).</span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p></div></div></blockquote><div><br>I&#39;m a bit reluctant to use the inline feature list for now. Since the clustered features are in place, there&#39;s no need to populate a new list with the features. In addition, the inline features are written in the mapfile as well which is a fairly unwanted effect. <br>
<br> </div><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);">For querying, hmmm… Let me think on that too…</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p></div></div></blockquote><div><br>In this case the user would use the separate layer with this new connectiontype, where the clustered features would be available for the query as well.<br>
<br>Best regards,<br><br>Tamas <br></div></div><br><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>