[UMN_MAPSERVER-USERS] wrong with coordinate conversion

Stephane Lessard LESSARDST at DFO-MPO.GC.CA
Fri Nov 5 13:42:59 EST 2004


Try:

X = (map_maxx - map_minx) * (image_click_coord_x / image_width) + map_minx

And

Y = (map_maxy - map_miny) * (image_click_coord_y / image_height) + map_miny

HTH
Stef



> -----Message d'origine-----
> De : temiz [mailto:temiz at DEPREM.GOV.TR] 
> Envoyé : 5 novembre 2004 09:35
> À : MAPSERVER-USERS at LISTS.UMN.EDU
> Objet : [UMN_MAPSERVER-USERS] wrong with coordinate conversion
> 
> 
> hello
> 
> For using reference map with php mapscript, I have developed
> a formula to convert image coordinates to map coordinates.
> But there seems to be something wrong with it.
> 
> here is the formula:
> "map_coord of a clicked point = (map_maxx - map_minx) * 
> image_click_ccord / image_width"
> 
> what am I doing wrong ?
> 
> kind regards
> 
> Ahmet Temiz
> 
> 
> 
> ______________________________________
> Inflex - installed on mailserver for domain @deprem.gov.tr 
> Queries to: postmaster at deprem.gov.tr
> 
> ______________________________________
> The views and opinions expressed in this e-mail message are 
> the sender's own and do not necessarily represent the views 
> and the opinions of Earthquake Research Dept. of General 
> Directorate of Disaster Affairs.
> 
> Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, 
> yasal olarak T.C. B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma 
> Dairesi'ni baglayici nitelikte degildir.
> 



More information about the mapserver-users mailing list