Last active
May 13, 2025 07:50
-
-
Save will83/5920606 to your computer and use it in GitHub Desktop.
Revisions
-
will83 revised this gist
Jan 31, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ function lambert93ToWgs84($x, $y){ $delx = $x - $b14; $dely = $y - $b15; $gamma = atan( -($delx) / $dely ); $r = sqrt(($delx*$delx)+($dely*$dely)); $latiso = log($b17/$r)/$b16; $sinphiit0 = tanh($latiso+$b10*atanh($b10*sin(1))); $sinphiit1 = tanh($latiso+$b10*atanh($b10*$sinphiit0)); -
will83 revised this gist
Jan 31, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ function lambert93ToWgs84($x, $y){ $delx = $x - $b14; $dely = $y - $b15; $gamma = atan( -($delx) / $dely ); $r = sqrt(($delx*$delx))+(($dely*$dely)); $latiso = log($b17/$r)/$b16; $sinphiit0 = tanh($latiso+$b10*atanh($b10*sin(1))); $sinphiit1 = tanh($latiso+$b10*atanh($b10*$sinphiit0)); -
will83 revised this gist
Jul 3, 2013 . No changes.There are no files selected for viewing
-
will83 revised this gist
Jul 3, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,6 @@ function lambert93ToWgs84($x, $y){ $latrad = asin($sinphiit6); $long = ($longrad/pi()*180); $lat = ($latrad/pi()*180); return array( 'lambert93' => array( -
will83 revised this gist
Jul 3, 2013 . 1 changed file with 23 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,4 +40,26 @@ function lambert93ToWgs84($x, $y){ 'long' => $long ) ); } // Exemple d'utilisation : $x = 955502.7409000024; $y = 6225307.0799999982; print_r(lambert93ToWgs84($x,$y)); /* Résultat en sortie : Array ( [lambert93] => Array ( [x] => 955502.7409000024 [y] => 6225307.0799999982 ) [wgs84] => Array ( [lat] => 43.081387131355 [long] => 6.1358573938246 ) ) */ -
will83 revised this gist
Jul 3, 2013 . No changes.There are no files selected for viewing
-
will83 revised this gist
Jul 3, 2013 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,17 @@ <?php function lambert93ToWgs84($x, $y){ $x = number_format($x, 10, '.', ''); $y = number_format($y, 10, '.', ''); $b6 = 6378137.0000; $b7 = 298.257222101; $b8 = 1/$b7; $b9 = 2*$b8-$b8*$b8; $b10 = sqrt($b9); $b13 = 3.000000000; $b14 = 700000.0000; $b15 = 12655612.0499; $b16 = 0.7256077650532670; $b17 = 11754255.426096; $delx = $x - $b14; $dely = $y - $b15; $gamma = atan( -($delx) / $dely ); @@ -43,5 +40,4 @@ function lambert93ToWgs84($x, $y){ 'long' => $long ) ); } -
will83 created this gist
Jul 3, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ function lambert93ToWgs84($x, $y){ $x = number_format($x, 10, '.', ''); $y = number_format($y, 10, '.', ''); $b6 = 6378137.0000; $b7 = 298.257222101; $b8 = 1/$b7; $b9 = 2*$b8-$b8*$b8; $b10 = sqrt($b9); $b13 = 3.000000000; $b14 = 700000.0000; $b15 = 12655612.0499; $b16 = 0.7256077650532670; $b17 = 11754255.426096; $delx = $x - $b14; $dely = $y - $b15; $gamma = atan( -($delx) / $dely ); $r = sqrt((carre($delx))+(carre($dely))); $latiso = log($b17/$r)/$b16; $sinphiit0 = tanh($latiso+$b10*atanh($b10*sin(1))); $sinphiit1 = tanh($latiso+$b10*atanh($b10*$sinphiit0)); $sinphiit2 = tanh($latiso+$b10*atanh($b10*$sinphiit1)); $sinphiit3 = tanh($latiso+$b10*atanh($b10*$sinphiit2)); $sinphiit4 = tanh($latiso+$b10*atanh($b10*$sinphiit3)); $sinphiit5 = tanh($latiso+$b10*atanh($b10*$sinphiit4)); $sinphiit6 = tanh($latiso+$b10*atanh($b10*$sinphiit5)); $longrad = $gamma/$b16+$b13/180*pi(); $latrad = asin($sinphiit6); $long = ($longrad/pi()*180); $lat = ($latrad/pi()*180); print_r($x); return array( 'lambert93' => array( 'x' => $x, 'y' => $y ), 'wgs84' => array( 'lat' => $lat, 'long' => $long ) ); }