<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 </DIV>
<DIV>2.District </DIV>
<DIV>3. State</DIV>
<DIV> </DIV>
<DIV>I want to get this info corresponding to my lat and long.</DIV>
<DIV> </DIV>
<DIV>My map file layer is like this</DIV>
<DIV>---------------------</DIV>
<DIV>MAP <BR> NAME "ind"<BR> SIZE 500 500<BR> STATUS ON<BR> SYMBOLSET "maps/symbols/examples.sym"<BR> EXTENT 67 5 99 40</DIV>
<DIV> <BR> SHAPEPATH "maps/data/"<BR> <BR> PROJECTION<BR> "proj=latlong"<BR> "datum=NAD83"<BR> END<BR> <BR> WEB<BR> IMAGEPATH "maps/tmp/"<BR> IMAGEURL "<A href="http://nagaraj:9000/maps/tmp/">maps/</A>"<BR> TEMPLATE 'maps/myind.html'<BR> END</DIV>
<DIV> </DIV>
<DIV>QUERYMAP<BR> STATUS ON<BR> STYLE SELECTED<BR> COLOR 255 255 0<BR> END</DIV>
<DIV> </DIV>
<DIV> LAYER<BR> NAME "Ind"<BR> TYPE POLYGON<BR> STATUS ON<BR> DATA "ind_ds"<BR> PROJECTION<BR> "proj=latlong"<BR> "ellps=GRS80"<BR> END<BR> CLASS<BR> NAME "IND MAP"<BR> OUTLINECOLOR 0 0 0<BR> COLOR 255 255 0<BR> SYMBOL dash-long<BR> STATUS ON <BR> END<BR> TEMPLATE ind_query.html<BR> END</DIV>
<DIV> </DIV>
<DIV>END</DIV>
<DIV>-----------------------</DIV>
<DIV> </DIV>
<DIV>And Iam calling Query by point as folows</DIV>
<DIV> </DIV>
<DIV>$point = ms_newpointObj();<BR>$point->setXY($lon,$lat);</DIV>
<DIV>$layer1 = $map->getLayerByName('Ind');<BR>if($layer1->queryBypoint($point,MS_SINGLE,$buffer) == MS_SUCCESS){<BR> echo "Success : $buffer";<BR>}</DIV>
<DIV> </DIV>
<DIV>Iam getting this warning message </DIV>
<DIV>Warning: [MapServer Error]: msQueryByPoint(): No matching record(s) found. </DIV>
<DIV> </DIV>
<DIV>Iam new to mapserver & 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> </DIV>
<DIV>The concepts of layers are also not much clear to me. Regarding Mapscript and Map File , reference documents are there but I could not find any elaborate examples or application notes.</DIV>
<DIV> Please tell me where i can find them.</DIV>
<DIV> </DIV>
<DIV>I also could not find any good samples similar to my requirement.</DIV>
<DIV> </DIV>
<DIV>Some one please help me.</DIV>
<DIV> </DIV>
<DIV>Regards</DIV>
<DIV>vdharan</DIV>
<DIV> </DIV>
<DIV> </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.