salah jubeh writes:

CAN ANY BODY HELP ME IN TRANSLATE THIS TO TCL map = mapscript.Map('rquery.map') layer = map.getLayer(0) pnt = mapscript.Point() pnt.x = 440780 pnt.y = 3751260 layer.queryByPoint( map, pnt, mapscript.MS_MULTIPLE, 180.0 ) layer.open() for i in range(1000): result = layer.getResult( i ) if result is None: break print '(%d,%d)' % (result.shapeindex, result.tileindex) s = layer.getShape( result.shapeindex, result.tileindex ) for i in range(layer.numitems): print '%s: %s' % (layer.getItem(i), s.getValue(i)) layer.close()

Salah, Assuming that this probably relates to the question you posted some time ago regarding TCLMapScript I'm going to attempt to supply some history that may or may-not help as it is all I can do in regards to TCL. The last time I recall seeing any "active" maintenance/support for the TCL flavor of MapScript is in version 3.3 (maybe 3.5). That doesn't mean that the TCL version doesn't work but there are a few issues that you may run into. Basically the TCL interface is maintained via SWIG from the C source code and is/can-be recreated in an automated fashion for each release but I do not recall any replies to TCL questions recently outside of Sean G. who usually provides great support for the MapScript API "in depth" but may not be able to help with specifics for TCL. This is the same method used for the Java, Perl, Python, Ruby versions. This does leave a support position open that you could fill once you are more familiar with it ;-) The other issue I know of is (at least at the time of 3.3) that TCL does/did not have a direct "module" for accessing Xbase files outside of mapscript so there were objects/methods/routines placed into mapscript to allow the tcl interface to access field names, values, & etc. At first when the older perlmapscript (my finger tires of capitalizing) documentation was done those objects & etc. where documented but proved to cause more trouble than it was worth when a person could simply include "use XBase" or such and access the information through an API that was intended for that purpose. That said, I think Sean has once again included documentation for said objects & etc. as of 4.4. As a starting point you could use the base swigmapscript documentation and see what works & what doesn't. As an example of a specific issue, until the event of a patch during the life of 4.4 and then in 4.6 you could not hold an imageobj in a scalar in the perl version due to the lack of a swig typemap (which has since been created).
Lowell

Reply via email to