<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Mar 10, 2006, at 5:58 PM, salah jubeh wrote:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">CAN ANY BODY HELP ME IN TRANSLATE THIS TO TCL</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4"> </FONT><FONT class="Apple-style-span" color="#1817D4">map = mapscript.Map('rquery.map')</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">set map [mapscript::mapObj -args "rquery.map"]</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4"> </FONT><FONT class="Apple-style-span" color="#1817D4">layer = map.getLayer(0) </FONT><FONT class="Apple-style-span" color="#1817D4">   </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">set layer [$map getLayer 0]</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4"> </FONT><FONT class="Apple-style-span" color="#1817D4">pnt = mapscript.Point()  </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4"> </FONT><FONT class="Apple-style-span" color="#1817D4">pnt.x = 440780</FONT><FONT class="Apple-style-span" color="#1817D4">  </FONT><FONT class="Apple-style-span" color="#1817D4">pnt.y = 3751260 </FONT><FONT class="Apple-style-span" color="#1817D4">     </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">set pnt [::mapscript::new_pointObj 440780 3751260]</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">layer.queryByPoint( map, pnt, mapscript.MS_MULTIPLE, 180.0 ) </FONT><FONT class="Apple-style-span" color="#1817D4">   </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">$layer queryByPoint $map $pnt $::mapscript::MS_MULTIPLE 180.0</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">layer.open()</FONT><FONT class="Apple-style-span" color="#1817D4">  </FONT><FONT class="Apple-style-span" color="#1817D4">for i in range(1000): </FONT><FONT class="Apple-style-span" color="#1817D4">   </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">result = layer.getResult( i ) </FONT><FONT class="Apple-style-span" color="#1817D4">   </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">if result is None: </FONT><FONT class="Apple-style-span" color="#1817D4">     </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">break </FONT><FONT class="Apple-style-span" color="#1817D4">           </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    $layer open</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    for {set i 0} {$i &lt; [$layer getNumResults]} {incr i} {</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">        set result [$layer getResult]</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">        if {$result == "NULL"} break</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">print '(%d,%d)' % (result.shapeindex, result.tileindex) </FONT><FONT class="Apple-style-span" color="#1817D4">           </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    puts [format "%d,%d" [$result shapeindex] [$result tileindex]]</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">s = layer.getShape( result.shapeindex, result.tileindex ) </FONT><FONT class="Apple-style-span" color="#1817D4">   </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">    set s [$layer getShape [$result shapeindex] [$result tileindex]</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">etc etc etc</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">for i in range(layer.numitems): </FONT><FONT class="Apple-style-span" color="#1817D4">     </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">print '%s: %s' % (layer.getItem(i), s.getValue(i))</FONT><FONT class="Apple-style-span" color="#1817D4">       </FONT></DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><FONT class="Apple-style-span" color="#1817D4">       <BR class="khtml-block-placeholder"></FONT></P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#1817D4">layer.close() </FONT><FONT class="Apple-style-span" color="#1817D4"> </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Don't listen to people who tell you Tcl mapscript is all broken.  Take a look at flightaware.com -- it's Tcl all the way.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><FONT class="Apple-style-span" color="#1817D4"><BR></FONT></DIV><P style="margin-top: 0px; margin-right: 0px; margin-bottom: 6px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "></P></BODY></HTML>