William,<br><br>You could probably do something like:<br><br>layerObj layer = map.getLayerByName(&quot;POINTLAYER&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layerObj layer2 = map.getLayerByName(&quot;OTHERLAYER&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer.queryByPoint(map, point, mapscript.MS_SINGLE, 0);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resultCacheObj results = layer.getResults()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (results != null &amp;&amp; results.numresults &gt; 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer.open();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resultCacheMemberObj res = results.getResult(0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shapeObj shape = layer.getFeature(res.shapeindex, res.tileindex);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (shape!= null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer2.queryByShape(shape.buffer(width));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resultCacheObj results2 = layer2.getResults()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (results2 != null &amp;&amp; results2.numresults &gt; 0)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer2.open();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i=0; i &lt; results2.numresults; i++)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resultCacheMemberObj res2 = results2.getResult(j);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shapeObj shape2 = layer2.getFeature(res2.shapeindex, res2.tileindex);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // do something with shape2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer2.close();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; layer.close();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br><br>Best regards,<br><br>Tamas<br>
<br><br><br><div class="gmail_quote">2008/11/26 william paul <span dir="ltr">&lt;<a href="mailto:williampaul28@yahoo.com">williampaul28@yahoo.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>
<div>Hello:</div>
<div>&nbsp;</div>
<div>I have created a simple mapserver using mapscript C#. I want to be able to select a point feature from a point layer, buffer that point feature and use the buffer for a <span style="border-bottom: 1px dashed rgb(0, 102, 204);"><span style="border-bottom: 1px dashed rgb(0, 102, 204);"><span style="border-bottom: 1px dashed rgb(0, 102, 204); background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">spatial query</span></span></span> for features from other layer</div>

<div>&nbsp;</div>
<div>Does someone have an example or had similar projects?</div>
<div>&nbsp;</div>
<div>Thank you in advance,</div>
<div>&nbsp;</div>
<div>William</div></div></div><br>

      </div><br>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br>