<DIV>Hi all,</DIV>
<DIV>I have one trouble about projection. My testing area is around UTM zone-47 and zone-48. The official road shapefile is translated both zones into zone-47 (Indian 1975). My road is in zone-48 (WGS84). So, I'd like to translate my utm-48 road data into zone-47. I used:</DIV>
<DIV>&nbsp;</DIV>
<DIV>$proj48=ms_newProjectionObj("proj=utm,zone=48,ellps=WGS84,datum=WGS84,units=m,no_defs");</DIV>
<DIV>$proj47=ms_newProjectionObj("proj=utm,zone=47,a=6377276.345,b=6356075.413,towgs84=209,818,290,0,0,0,0,units=m,no_defs");</DIV>
<DIV>&nbsp;</DIV>
<DIV>$line=ms_newLineObj();</DIV>
<DIV>$pt=ms_newPointObj();</DIV>
<DIV>$pt-&gt;setXY(195397,1604329);</DIV>
<DIV>$pt-&gt;project($proj48,$proj47);</DIV>
<DIV>$line-&gt;add($pt);</DIV>
<DIV>
<DIV>$pt-&gt;setXY(195385,1604354);</DIV>
<DIV>$pt-&gt;project($proj48,$proj47);</DIV>
<DIV>$line-&gt;add($pt);</DIV>
<DIV>.............</DIV>
<DIV>$shp-&gt;add($line);</DIV>
<DIV>&nbsp;</DIV>
<DIV>My road should overlay onto official road. But it wasn't on the right place, it shifted to the left of official road about 350m. If I use data by not translating in map file as:</DIV>
<DIV>&nbsp;</DIV>
<DIV>.............</DIV>
<DIV># ------------- Official road ----------</DIV>
<DIV>LAYER</DIV>
<DIV>&nbsp; NAME "road47"</DIV>
<DIV>&nbsp; DATA "road/road47</DIV>
<DIV>&nbsp; TYPE line</DIV>
<DIV>&nbsp; PROJECTION</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "proj=utm"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "zone=47"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "a=6377276.345"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "b=6356075.413"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "towgs84=209,818,290,0,0,0,0"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "units=m"</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;"no_defs"</DIV>
<DIV>&nbsp; END</DIV>
<DIV>&nbsp; CLASS</DIV>
<DIV>&nbsp;&nbsp;&nbsp; COLOR 0 200 0</DIV>
<DIV>&nbsp; END</DIV>
<DIV>END</DIV>
<DIV>
<DIV># -------------&nbsp;my road ----------</DIV>
<DIV>LAYER</DIV>
<DIV>&nbsp; NAME "road48"</DIV>
<DIV>&nbsp; DATA "road/road48</DIV>
<DIV>&nbsp; TYPE line</DIV>
<DIV>&nbsp; PROJECTION</DIV>
<DIV>
<DIV>&nbsp;&nbsp;&nbsp; "proj=utm"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "zone=48"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "ellps=WGS84"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "datum=WGS84"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "units=m"</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "no_defs"</DIV>&nbsp; END</DIV>
<DIV>&nbsp; CLASS</DIV>
<DIV>&nbsp;&nbsp;&nbsp; COLOR 0 200 0</DIV>
<DIV>&nbsp; END</DIV>
<DIV>END</DIV>
<DIV>.......</DIV>
<DIV>&nbsp;</DIV>
<DIV>It works as it should be. What I've done wrong about the script above. Could I use this way to re-projection on the fly?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Krung</DIV>
<DIV>&nbsp;</DIV></DIV></DIV><p>
                <hr size=1> <a href="http://us.rd.yahoo.com/evt=34442/*http://www.yahoo.com/r/hs">Start your day with Yahoo! - make it your home page </a>