unit1.~pas

来自「testlonglat GOOGLE卫星图片计算的DELPHI测试程序」· ~PAS 代码 · 共 85 行

~PAS
85
字号
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, CommFunc, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Button1: TButton;
    Button2: TButton;
    Edit6: TEdit;
    Edit7: TEdit;
    Edit8: TEdit;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  CurRet,tmpRet,FRet,CRet:TRet;
  Center_qrst,frist_qrst,Curqrst:string;
  C_Row,C_Col:integer;
  w1,tmpLat:double;
  tileWidth:double;
  RowCol:TRowCol;
begin
   //中心点QRST
   //Center_qrst:=GetQuadtreeAddress(17, 120.2347, 29.7155);
   //edit1.Text:=Center_qrst;
    Center_qrst:=GetQuadtreeAddress(17, 120.2347, 42.05000);
   {CRet:=GetCoordinatesFromAddress(Center_qrst);
   C_Row:=1;
   Curqrst:=Center_qrst;
   CurRet:=GetCoordinatesFromAddress(Center_qrst);
   while(CurRet.latmin<85.0511287798066) do begin
       inc(C_Row);
       Curqrst:=GetNextTileY(Curqrst, 0);
       CurRet:=GetCoordinatesFromAddress(Curqrst);
   end;
   edit1.Text:=inttostr(C_Row);
   }
   RowCol:=GetQuadtreeXY(Center_qrst);
   edit2.Text:=inttostr(RowCol.Row); 
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  RowCol:TRowCol;
begin
   //中心点QRST
   {
   Center_qrst:=GetQuadtreeAddress(17, 120.2347, 29.7155);
   edit3.Text:=Center_qrst;
   CRet:=GetCoordinatesFromAddress(Center_qrst);
   edit1.Text:=floattostr(CRet.latmax);



   Curqrst:=GetNextTileY(Center_qrst, 1);
   edit4.Text:=Curqrst;
   }
   RowCol:=GetQuadtreeXY(Edit8.Text);
   edit1.Text:=floattostr(RowCol.Row) + '|' + floattostr(RowCol.Col);
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?