<DIV>
<DIV>Hi,</DIV>
<DIV>Iam using MapScript.</DIV>
<DIV>I want to find out the State and District name using latiudes and longitudes. My .dbf file has the following fields</DIV>
<DIV>1.Dst_ID&nbsp;</DIV>
<DIV>2.District&nbsp;</DIV>
<DIV>3.&nbsp;State</DIV>
<DIV>&nbsp;</DIV>
<DIV>I want to get this info corresponding to my lat and long.</DIV>
<DIV>&nbsp;</DIV>
<DIV>My map file layer is like this</DIV>
<DIV>---------------------</DIV>
<DIV>MAP&nbsp;<BR>&nbsp;NAME "ind"<BR>&nbsp;SIZE 500 500<BR>&nbsp;STATUS ON<BR>&nbsp;SYMBOLSET "maps/symbols/examples.sym"<BR>&nbsp;EXTENT 67 5 99 40</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;SHAPEPATH "maps/data/"<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; PROJECTION<BR>&nbsp;&nbsp;"proj=latlong"<BR>&nbsp;&nbsp;"datum=NAD83"<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;<BR>&nbsp;WEB<BR>&nbsp;&nbsp;IMAGEPATH "maps/tmp/"<BR>&nbsp;&nbsp;IMAGEURL "<A href="http://nagaraj:9000/maps/tmp/">maps/</A>"<BR>&nbsp;&nbsp;TEMPLATE&nbsp; 'maps/myind.html'<BR>&nbsp;END</DIV>
<DIV>&nbsp;</DIV>
<DIV>QUERYMAP<BR>&nbsp;&nbsp;STATUS ON<BR>&nbsp;&nbsp;STYLE SELECTED<BR>&nbsp;&nbsp;COLOR 255 255 0<BR>&nbsp;END</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;LAYER<BR>&nbsp;&nbsp;NAME "Ind"<BR>&nbsp;&nbsp;TYPE POLYGON<BR>&nbsp;&nbsp;STATUS ON<BR>&nbsp;&nbsp;DATA "ind_ds"<BR>&nbsp;&nbsp;PROJECTION<BR>&nbsp;&nbsp;&nbsp;"proj=latlong"<BR>&nbsp;&nbsp;&nbsp;"ellps=GRS80"<BR>&nbsp;&nbsp;END<BR>&nbsp;&nbsp;CLASS<BR>&nbsp;&nbsp;&nbsp;NAME "IND MAP"<BR>&nbsp;&nbsp;&nbsp;OUTLINECOLOR 0 0 0<BR>&nbsp;&nbsp;&nbsp;COLOR 255 255 0<BR>&nbsp;&nbsp;&nbsp;SYMBOL dash-long<BR>&nbsp;&nbsp;&nbsp;STATUS ON <BR>&nbsp;&nbsp;END<BR>&nbsp;&nbsp;TEMPLATE ind_query.html<BR>&nbsp;END</DIV>
<DIV>&nbsp;</DIV>
<DIV>END</DIV>
<DIV>-----------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>And Iam calling Query by point as folows</DIV>
<DIV>&nbsp;</DIV>
<DIV>$point = ms_newpointObj();<BR>$point-&gt;setXY($lon,$lat);</DIV>
<DIV>$layer1 = $map-&gt;getLayerByName('Ind');<BR>if($layer1-&gt;queryBypoint($point,MS_SINGLE,$buffer) == MS_SUCCESS){<BR>&nbsp;echo "Success : $buffer";<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>Iam getting this warning message </DIV>
<DIV>Warning: [MapServer Error]: msQueryByPoint(): No matching record(s) found. </DIV>
<DIV>&nbsp;</DIV>
<DIV>Iam new to mapserver &amp; I really dont know whether this is the right method to get the info from the dbf file. Iam having only one polygon layer. Do i need to have another layer for quering.?. </DIV>
<DIV>Please tell me where Iam going wrong.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The concepts of layers are also not much clear to me. Regarding Mapscript and Map File&nbsp;, reference documents are there but I could not find any elaborate examples or application notes.</DIV>
<DIV>&nbsp;Please tell me where i can find them.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I also could not find any good samples similar to my requirement.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Some one please help me.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards</DIV>
<DIV>vdharan</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV><p>
                <hr size=1>Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/mail_us/taglines/virus/*http://promotions.yahoo.com/new_mail/static/protection.html">Yahoo! Mail</a> - Helps protect you from nasty viruses.