phpbar.de logo

Mailinglisten-Archive

Re: [php] Gauss-Krüger Daten nach Geodaten

Re: [php] Gauss-Krüger Daten nach Geodaten

harald_hanek at hotmail.com harald_hanek at hotmail.com
Fre Apr 1 23:44:30 CEST 2005


ok, hab ein delphiscript gefunden:

procedure GeoGk(br,la:Twinkel;sy:Longint;var x,y:double);
const
  {26}
  rho = 180 / pi;
var
  brDezimal,laDezimal,rm,e2,c,bf,g,co,g2,g1,t,dl,fa,grad,min,sek :extended;
begin
  {25}
  e2 := 0.0067192188;
  {27}
  c := 6398786.849;
  {in Dezimal}
  {Breite}
  brDezimal := br.grad + br.min / 60 + br.sek / 3600;
  {Laenge}
  laDezimal := la.grad + la.min / 60 + la.sek / 3600;
  {64}
  bf := brDezimal / rho;
  {65}
  g := 111120.61962 * brDezimal
       -15988.63853 * sin(2*bf)
       +16.72995 * sin(4*bf)
       -0.02178 * sin(6*bf)
       +0.00003 * sin(8*bf);
  {70}
  co := cos(bf);
  {71}
  g2 := e2 * (co * co);
  {72}
  g1 := c / sqrt(1+g2);
  {73}
  t := sin(bf) / cos(bf); {=tan(t)}
  {74}
  dl := laDezimal - sy * 3;
  {77}
  fa := co * dl / rho;
  {78}
  y := g
       + fa * fa * t * g1 / 2
       + fa * fa * fa * fa * t * g1 * (5 - t * t + 9 * g2) / 24;
  {81}
  rm := fa * g1
        + fa * fa * fa * g1 * (1 - t * t + g2) / 6
        + fa * fa * fa * fa * fa * g1 * (5 - 18 * t * t * t * t * t * t) / 
120;
  {84}
  x := rm + sy * 1000000 + 500000;
end; 

php::bar PHP Wiki   -   Listenarchive