It wasn't so hard!
I ll post the solution, so everyone ll be able to do it
function getlocationcoords($lat, $lon, $width, $height)
{
$lat=$lat*20;
$lon=$lon*28;
$x = (($lon + 180) * ($width / 360));
$y = ((($lat * -1) + 90) * ($height / 180));
return array("x"=>round($x),"y"=>rou
It is a little hard to do, in fact there are several different
'projection systems' in existence. Since the Earth is not flat and
it is not even a perfect sphere, there are many ways to project
latitude and longitude information. You should check a GIS
(Geographical Information Systems) for
solution, and add it to the bottom line
for my client.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 02, 2006 8:50 AM
To: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: RE: [PHP] Coordenates latitude / longitude on PHP
[snip]
I have to create
ubio Rey" <[EMAIL PROTECTED]>
To:
Sent: Thursday, March 02, 2006 4:36 PM
Subject: [PHP] Coordenates latitude / longitude on PHP
Hi,
I have to create some maps from a latitude / longitude points.
Do anyone know how to convert it to plane coordenates? (In order to show
it on a bitmat)
Anas Mughal wrote:
Lat and long are all you need for rendering on an X,Y coordinate.
Keep in mind to adjust the ratio of lat and long depending on where
you are on the globe.
Good luck!
--
Anas Mughal
any other details? I have tried to convert lat and long to x and y
coordinate but it not
Lat and long are all you need for rendering on an X,Y coordinate.
Keep in mind to adjust the ratio of lat and long depending on where you are
on the globe.
Good luck!
--
Anas Mughal
Hi,
I have to create some maps from a latitude / longitude points.
Do anyone know how to convert it to plane coordenates? (In order to show
it on a bitmat)
I have already found a function but does not work very well ...
Any help will be apreciated.
Thanks in advance
--
PHP General Mailing L
[snip]
I have to create some maps from a latitude / longitude points.
Do anyone know how to convert it to plane coordenates? (In order to show
it on a bitmat)
I have already found a function but does not work very well ...
[/snip]
Plain coordinates? You mean as in X, Y coordinates? If so, lat a
8 matches
Mail list logo