home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form map_form
- BackColor = &H00FFFFFF&
- Caption = "Spatial Data Locator"
- ClientHeight = 4755
- ClientLeft = 105
- ClientTop = 1860
- ClientWidth = 9420
- Height = 5445
- Left = 45
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MousePointer = 11 'Hourglass
- ScaleHeight = 4755
- ScaleWidth = 9420
- Top = 1230
- Width = 9540
- Begin SSPanel disp_frame
- Align = 1 'Align Top
- BackColor = &H00808080&
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 555
- Left = 0
- Outline = -1 'True
- TabIndex = 0
- Top = 0
- Width = 9420
- Begin SSCommand clear_out_bbox
- AutoSize = 2 'Adjust Button Size To Picture
- BevelWidth = 1
- Font3D = 0 'None
- Height = 390
- Left = 1860
- Picture = MAP.FRX:0000
- TabIndex = 15
- Top = 90
- Width = 420
- End
- Begin SSCommand clear_in_bbox
- AutoSize = 2 'Adjust Button Size To Picture
- BevelWidth = 1
- Font3D = 0 'None
- Height = 390
- Left = 1470
- Picture = MAP.FRX:0182
- TabIndex = 14
- Top = 90
- Width = 420
- End
- Begin SSCommand copy_in2out_bbox
- AutoSize = 2 'Adjust Button Size To Picture
- BevelWidth = 1
- Font3D = 0 'None
- Height = 390
- Left = 1080
- Picture = MAP.FRX:0304
- TabIndex = 13
- Top = 90
- Width = 420
- End
- Begin SSCommand recenter_bbox
- AutoSize = 2 'Adjust Button Size To Picture
- BevelWidth = 1
- Font3D = 0 'None
- Height = 390
- Left = 600
- Picture = MAP.FRX:0486
- TabIndex = 12
- Top = 90
- Width = 420
- End
- Begin SSCommand load_save_bbox
- AutoSize = 2 'Adjust Button Size To Picture
- BevelWidth = 1
- Font3D = 0 'None
- Height = 390
- Left = 120
- Picture = MAP.FRX:0608
- TabIndex = 11
- Top = 90
- Width = 420
- End
- Begin SSPanel Panel3D6
- BackColor = &H00C0C0C0&
- BorderWidth = 1
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 375
- Left = 6240
- Outline = -1 'True
- TabIndex = 10
- Top = 90
- Width = 555
- Begin SpinButton spin_lon10
- BorderThickness = 0
- Height = 315
- Left = 30
- Top = 30
- Width = 255
- End
- Begin SpinButton spin_lon
- BorderThickness = 0
- Height = 315
- Left = 270
- Top = 30
- Width = 255
- End
- End
- Begin SSPanel Panel3D5
- BackColor = &H00C0C0C0&
- BorderWidth = 1
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 375
- Left = 4020
- Outline = -1 'True
- TabIndex = 9
- Top = 90
- Width = 555
- Begin SpinButton spin_lat10
- BorderThickness = 0
- Height = 315
- Left = 30
- Top = 30
- Width = 255
- End
- Begin SpinButton spin_lat
- BorderThickness = 0
- Height = 315
- Left = 270
- Top = 30
- Width = 255
- End
- End
- Begin SSPanel Panel3D1
- BackColor = &H00C0C0C0&
- BorderWidth = 1
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 375
- Left = 8070
- Outline = -1 'True
- TabIndex = 8
- Top = 90
- Width = 285
- Begin SpinButton spin_zoom
- BorderThickness = 0
- ForeColor = &H00000000&
- Height = 300
- Left = 30
- Top = 30
- Width = 225
- End
- End
- Begin CommandButton redraw
- Caption = "ReDraw"
- Height = 375
- Left = 8460
- TabIndex = 3
- Top = 90
- Width = 855
- End
- Begin SSPanel disp_lon
- BackColor = &H00FFFFFF&
- BevelOuter = 1 'Inset
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 255
- Left = 5700
- Outline = -1 'True
- RoundedCorners = 0 'False
- TabIndex = 7
- Top = 150
- Width = 555
- End
- Begin SSPanel Panel3D4
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Center Lon:"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Left = 4620
- Outline = -1 'True
- RoundedCorners = 0 'False
- TabIndex = 5
- Top = 150
- Width = 1095
- End
- Begin SSPanel disp_lat
- BackColor = &H00FFFFFF&
- BevelOuter = 1 'Inset
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 255
- Left = 3480
- Outline = -1 'True
- RoundedCorners = 0 'False
- TabIndex = 6
- Top = 150
- Width = 555
- End
- Begin SSPanel Panel3D3
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- Caption = "Center Lat:"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Left = 2400
- Outline = -1 'True
- RoundedCorners = 0 'False
- TabIndex = 4
- Top = 150
- Width = 1095
- End
- Begin SSPanel disp_zoom
- BackColor = &H00FFFFFF&
- BevelOuter = 1 'Inset
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 255
- Left = 7680
- Outline = -1 'True
- RoundedCorners = 0 'False
- TabIndex = 2
- Top = 150
- Width = 405
- End
- Begin SSPanel Panel3D2
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BorderWidth = 1
- Caption = "Zoom x:"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Left = 6840
- Outline = -1 'True
- RoundedCorners = 0 'False
- TabIndex = 1
- Top = 150
- Width = 855
- End
- End
- Begin Menu map_menu_file
- Caption = "&File"
- Begin Menu menu_load_save
- Caption = "Load/save location"
- End
- Begin Menu x
- Caption = "-"
- End
- Begin Menu map_menu_exit
- Caption = "E&xit"
- End
- End
- Begin Menu map_menu_edit
- Caption = "&Edit"
- Begin Menu map_menu_center
- Caption = "&Re-center"
- End
- Begin Menu map_menu_copy
- Caption = "&Copy in to out"
- End
- Begin Menu map_menu_clear_in
- Caption = "Clear &Input"
- End
- Begin Menu map_menu_clear_out
- Caption = "Clear &Output"
- End
- End
- Dim ref_center_x As Double
- Dim ref_center_y As Double
- Dim ref_radius As Double
- Dim center_lat As Double
- Dim center_lon As Double
- Dim center_lat_rad As Double
- Dim center_lon_rad As Double
- Dim sin_center_lat As Double
- Dim cos_center_lat As Double
- Dim zoom As Double
- Dim already_positioned As Integer
- Dim map_cancelled As Integer
- Sub clear_in_bbox_Click ()
- map_menu_clear_in_click
- End Sub
- Sub clear_out_bbox_Click ()
- map_menu_clear_out_click
- End Sub
- Sub copy_in2out_bbox_Click ()
- map_menu_copy_click
- End Sub
- Sub Form_Load ()
- scalemode = 3 ' use pixels for "C" subroutine calls
- form_cancelled = False
- already_positioned = False
- If question_form.max_displays.Checked Then
- windowstate = MAXIMIZED
- End If
- out_point = 0
- zoom = 1
- disp_zoom.Caption = Str$(zoom)
- disp_zoom.Refresh
- center_lat = 40
- center_lat_rad = center_lat * DEG2RAD
- sin_center_lat = Sin(center_lat_rad)
- cos_center_lat = Cos(center_lat_rad)
- disp_lat.Caption = Str$(center_lat)
- disp_lat.Refresh
- center_lon = -100
- center_lon_rad = center_lon * DEG2RAD
- disp_lon.Caption = Str$(center_lon)
- disp_lon.Refresh
- End Sub
- Sub Form_MouseDown (button As Integer, Shift As Integer, x As Single, Y As Single)
- If button = 1 Then
- If out_point < MAX_POINTS Then
- plot_line x, Y, out_location(), -1, RGB(255, 0, 0)' use out_point to plot lines
- Exit Sub
- Else
- msg$ = "Maximum of" + Str$(MAX_POINTS) + " points has been reached"
- MsgBox msg$, MB_INFO
- Exit Sub
- End If
- End If
- If out_point = 0 Then
- Exit Sub
- End If
- unplot_line x, Y, out_point, out_location()
- out_point = out_point - 1
- End Sub
- Sub form_resize ()
- Dim inlat As Double
- Dim inlon As Double
- Dim outx As Double
- Dim outy As Double
- Dim max_lat As Double
- Dim min_lat As Double
- Dim max_lon As Double
- Dim min_lon As Double
- Dim xx As Single
- Dim yy As Single
- Dim sign As Integer
- Dim x As Integer
- If form_cancelled Then
- Exit Sub
- End If
- If coprocessor <> 4 Then
- If 6 <> MsgBox("Drawing the map without a coprocessor takes a VERY long time. Proceed?", MB_WARN Or 4) Then
- form_cancelled = True
- map_form.Hide
- Exit Sub
- End If
- End If
- mousepointer = HOURGLASS
- Cls
- 'disp_frame.Width = scalewidth
- 'disp_frame.Refresh
- ref_center_x = scalewidth / 2
- ref_center_y = scaleheight / 2 + 20
- If ref_center_x < ref_center_y Then
- ref_radius = (scalewidth - 100) / 2
- Else
- ref_radius = (scaleheight - 60) / 2
- End If
- ref_radius = ref_radius * zoom
- If in_point > 0 Then
- If Not already_positioned Then
-
- max_lat = in_location(0, 0)
- min_lat = max_lat
- max_lon = in_location(0, 1)
- min_lon = max_lon
- For x = 1 To in_point - 1
- If in_location(x, 0) > max_lat Then
- max_lat = in_location(x, 0)
- End If
- If in_location(x, 0) < min_lat Then
- min_lat = in_location(x, 0)
- End If
- If in_location(x, 1) > max_lon Then
- max_lon = in_location(x, 1)
- End If
- If in_location(x, 1) < min_lon Then
- min_lon = in_location(x, 1)
- End If
- Next x
-
- center_lat = Int(min_lat + (max_lat - min_lat) / 2)
- center_lat_rad = center_lat * DEG2RAD
- sin_center_lat = Sin(center_lat_rad)
- cos_center_lat = Cos(center_lat_rad)
- disp_lat.Caption = Str$(center_lat)
- disp_lat.Refresh
-
- center_lon = Int(min_lon + (max_lon - min_lon) / 2)
- center_lon_rad = center_lon * DEG2RAD
- disp_lon.Caption = Str$(center_lon)
- disp_lon.Refresh
-
- already_positioned = True
- End If
- End If
- z = draw_map(hDC, True, True, ref_center_x, ref_center_y, ref_radius, center_lon_rad, sin_center_lat, cos_center_lat)
- If in_point > 0 Then
- For x = 0 To in_point - 1
- xxx = ortho(in_location(x, 0) * DEG2RAD, in_location(x, 1) * DEG2RAD, outx, outy)
- xx = outx + ref_center_x
- yy = ref_center_y - outy
- plot_line xx, yy, in_location(), x, RGB(0, 0, 255)
- Next x
- End If
- If out_point > 0 Then
- For x = 0 To out_point - 1
- xxx = ortho(out_location(x, 0) * DEG2RAD, out_location(x, 1) * DEG2RAD, outx, outy)
- xx = outx + ref_center_x
- yy = ref_center_y - outy
- plot_line xx, yy, out_location(), x, RGB(255, 0, 0)
- Next x
- End If
- mousepointer = DEFAULT
- End Sub
- Sub Form_Unload (Cancel As Integer)
- If out_point > 0 Then
- If 6 = MsgBox("Include coordinates in search?", MB_INFO Or 4) Then
- For C = 0 To out_point - 1
- lat$ = Format$(out_location(C, 0), "00.###")
- lon$ = Format$(out_location(C, 1), "00.###")
- ll$ = ll$ + lat$ + "," + lon$ + " "
- Next C
- question_form.keywords.Text = question_form.keywords.Text + " INSIDE(" + RTrim$(ll$) + ")"
- End If
- End If
- form_cancelled = True
- End Sub
- Sub load_save_bbox_Click ()
- menu_load_save_click
- End Sub
- Sub map_menu_center_click ()
- Dim x As Integer
- If out_point = 0 Then
- Exit Sub
- End If
- max_lat = out_location(0, 0)
- min_lat = max_lat
- max_lon = out_location(0, 1)
- min_lon = max_lon
- For x = 1 To out_point - 1
- If out_location(x, 0) > max_lat Then
- max_lat = out_location(x, 0)
- End If
- If out_location(x, 0) < min_lat Then
- min_lat = out_location(x, 0)
- End If
- If out_location(x, 1) > max_lon Then
- max_lon = out_location(x, 1)
- End If
- If out_location(x, 1) < min_lon Then
- min_lon = out_location(x, 1)
- End If
- Next x
-
- center_lat = Int(min_lat + (max_lat - min_lat) / 2)
- center_lat_rad = center_lat * DEG2RAD
- sin_center_lat = Sin(center_lat_rad)
- cos_center_lat = Cos(center_lat_rad)
- center_lon = Int(min_lon + (max_lon - min_lon) / 2)
- center_lon_rad = center_lon * DEG2RAD
- disp_lat.Caption = Str$(center_lat)
- disp_lat.Refresh
- disp_lon.Caption = Str$(center_lon)
- disp_lon.Refresh
-
- form_resize
- End Sub
- Sub map_menu_clear_in_click ()
- Dim outx As Double
- Dim outy As Double
- Dim xx As Single
- Dim yy As Single
- Dim x As Integer
- If in_point > 0 Then
-
- For x = in_point To 1 Step -1
- xxx = ortho(in_location(x, 0) * DEG2RAD, in_location(x, 1) * DEG2RAD, outx, outy)
- xx = outx + ref_center_x
- yy = ref_center_y - outy
- unplot_line xx, yy, x, in_location()
- Next x
-
- in_point = 0
- End If
- End Sub
- Sub map_menu_clear_out_click ()
- Dim outx As Double
- Dim outy As Double
- Dim xx As Single
- Dim yy As Single
- Dim x As Integer
- If out_point > 0 Then
-
- For x = out_point To 1 Step -1
- xxx = ortho(out_location(x, 0) * DEG2RAD, out_location(x, 1) * DEG2RAD, outx, outy)
- xx = outx + ref_center_x
- yy = ref_center_y - outy
- unplot_line xx, yy, x, out_location()
- Next x
- out_point = 0
- End If
- End Sub
- Sub map_menu_copy_click ()
- Dim outx As Double
- Dim outy As Double
- Dim xx As Single
- Dim yy As Single
- Dim x As Integer
- If in_point > 0 Then
-
- For x = 0 To in_point - 1
- out_location(x, 0) = in_location(x, 0)
- out_location(x, 1) = in_location(x, 1)
- Next x
-
- out_point = in_point
-
- For x = 0 To out_point - 1
- xxx = ortho(out_location(x, 0) * DEG2RAD, out_location(x, 1) * DEG2RAD, outx, outy)
- xx = outx + ref_center_x
- yy = ref_center_y - outy
- plot_line xx, yy, out_location(), x, RGB(255, 0, 0)
- Next x
- End If
- End Sub
- Sub map_menu_exit_click ()
- map_form.Hide
- End Sub
- Sub menu_load_save_click ()
- maploc_form.Show 1
- Unload maploc_form
- form_resize
- End Sub
- Function ortho (inlat As Double, inlon As Double, outx As Double, outy As Double) As Integer
- Dim delta As Double
- Dim cosL As Double
- Dim cosC As Double
- Dim sin_inlat As Double
- Dim cos_inlat As Double
- delta = inlon - center_lon_rad
- If delta < -PI Then
- delta = delta + TWOPI
- ElseIf delta > PI Then
- delta = delta - TWOPI
- End If
- sin_inlat = Sin(inlat)
- cos_inlat = Cos(inlat)
- cosL = Cos(delta) * cos_inlat
- cosC = sin_center_lat * sin_inlat + cos_center_lat * cosL
- If cosC >= 0 Then
- outx = cos_inlat * Sin(delta) * ref_radius
- outy = (cos_center_lat * sin_inlat - sin_center_lat * cosL) * ref_radius
- ortho = 0
- Else
- ortho = -1
- End If
- End Function
- Sub plot_line (x As Single, Y As Single, latlon() As Double, pnt As Integer, color As Long)
- Dim x_to_center As Double
- Dim y_to_center As Double
- Dim rad As Double
- Dim dR As Double
- Dim A As Double
- Dim B As Double
- Dim C As Double
- Dim sinC As Double
- Dim cosC As Double
- Dim sin_out_lat As Double
- Dim out_lat As Double
- Dim out_lon As Double
- Dim mid_lat As Double
- Dim mid_lon As Double
- Dim outx As Double
- Dim outy As Double
- Dim xx As Double
- Dim yy As Double
- Dim oldx As Double
- Dim oldy As Double
- Dim pt As Integer
- Dim line_break As Integer
- x_to_center = x - ref_center_x
- y_to_center = ref_center_y - Y
- rad = Sqr(x_to_center ^ 2 + y_to_center ^ 2)
- If rad > ref_radius Then
- Exit Sub
- End If
- If rad = 0 Then
-
- out_lat = center_lat
- out_lon = center_lon
- Else
-
- dR = rad / ref_radius
-
- C = Atn(dR / Sqr(-dR * dR + 1)) ' c = arcsin(dR)
-
- sinC = Sin(C)
- cosC = Cos(C)
- sin_out_lat = cosC * sin_center_lat + (y_to_center * sinC * cos_center_lat / rad)
- out_lat = Atn(sin_out_lat / Sqr(-sin_out_lat * sin_out_lat + 1)) * RAD2DEG
-
- Select Case center_lat
- Case 90
- A = x_to_center
- B = -y_to_center
- Case -90
- A = x_to_center
- B = y_to_center
- Case Else
- A = x_to_center * sinC
- B = rad * cos_center_lat * cosC - y_to_center * sin_center_lat * sinC
- End Select
- Select Case Sgn(B)
- Case -1
- out_lon = center_lon + Atn(A / B) * RAD2DEG + 180 * Sgn(A)
- Case 0
- out_lon = 90 * Sgn(A)
- Case 1
- out_lon = center_lon + Atn(A / B) * RAD2DEG
- End Select
- While out_lon > 180
- out_lon = out_lon - 360
- Wend
-
- While out_lon < -180
- out_lon = out_lon + 360
- Wend
- End If
- stat = ortho(out_lat * DEG2RAD, out_lon * DEG2RAD, outx, outy)
- xx = outx + ref_center_x
- yy = ref_center_y - outy
- If pnt < 0 Then
- pt = out_point
- latlon(pt, 0) = out_lat
- latlon(pt, 1) = out_lon
- Else
- pt = pnt
- End If
- If stat <> -1 Then
- Line (xx - 1, yy - 1)-(xx + 1, yy + 1), color, B
- End If
- If pt > 0 Then
-
- mid_lat = (latlon(pt - 1, 0) - out_lat) / LINE_DENSITY
- mid_lon = (latlon(pt - 1, 1) - out_lon) / LINE_DENSITY
-
- oldx = xx
- oldy = yy
-
- line_break = False
-
- For inc = 1 To LINE_DENSITY
-
- If -1 <> ortho((out_lat + mid_lat) * DEG2RAD, (out_lon + mid_lon) * DEG2RAD, outx, outy) Then
- xx = oldx
- yy = oldy
- oldx = outx + ref_center_x
- oldy = ref_center_y - outy
- If line_break = False Then
- Line (oldx, oldy)-(xx, yy), color
- End If
- line_break = False
- Else
- line_break = True
- End If
-
- out_lat = out_lat + mid_lat
- out_lon = out_lon + mid_lon
-
- Next inc
- End If
- If pnt < 0 Then
- out_point = out_point + 1
- End If
- End Sub
- Sub recenter_bbox_Click ()
- map_menu_center_click
- End Sub
- Sub redraw_Click ()
- Static reentry As Integer
- If reentry Then
- map_cancelled = True
- Exit Sub
- End If
- reentry = True
- form_resize
- reentry = False
- End Sub
- Sub spin_lat_SpinDown ()
- If center_lat > -90 Then
- center_lat = Int(center_lat) - 1
- center_lat_rad = center_lat * DEG2RAD
- sin_center_lat = Sin(center_lat_rad)
- cos_center_lat = Cos(center_lat_rad)
- disp_lat.Caption = Str$(center_lat)
- disp_lat.Refresh
- End If
- End Sub
- Sub spin_lat_SpinUp ()
- If center_lat < 90 Then
- center_lat = Int(center_lat) + 1
- center_lat_rad = center_lat * DEG2RAD
- sin_center_lat = Sin(center_lat_rad)
- cos_center_lat = Cos(center_lat_rad)
- disp_lat.Caption = Str$(center_lat)
- disp_lat.Refresh
- End If
- End Sub
- Sub spin_lat10_SpinDown ()
- If center_lat > -86 Then
-
- center_lat = Int(center_lat) - 5
- center_lat_rad = center_lat * DEG2RAD
- sin_center_lat = Sin(center_lat_rad)
- cos_center_lat = Cos(center_lat_rad)
- disp_lat.Caption = Str$(center_lat)
- disp_lat.Refresh
- End If
- End Sub
- Sub spin_lat10_SpinUp ()
- If center_lat < 86 Then
-
- center_lat = Int(center_lat) + 5
- center_lat_rad = center_lat * DEG2RAD
- sin_center_lat = Sin(center_lat_rad)
- cos_center_lat = Cos(center_lat_rad)
- disp_lat.Caption = Str$(center_lat)
- disp_lat.Refresh
- End If
- End Sub
- Sub spin_lon_SpinDown ()
- If center_lon > -180 Then
- center_lon = Int(center_lon) - 1
- center_lon_rad = center_lon * DEG2RAD
- disp_lon.Caption = Str$(center_lon)
- disp_lon.Refresh
- End If
- End Sub
- Sub spin_lon_SpinUp ()
- If center_lon < 180 Then
-
- center_lon = Int(center_lon) + 1
- center_lon_rad = center_lon * DEG2RAD
- disp_lon.Caption = Str$(center_lon)
- disp_lon.Refresh
- End If
- End Sub
- Sub spin_lon10_SpinDown ()
- If center_lon > -171 Then
- center_lon = Int(center_lon) - 10
- center_lon_rad = center_lon * DEG2RAD
- disp_lon.Caption = Str$(center_lon)
- disp_lon.Refresh
- End If
- End Sub
- Sub spin_lon10_SpinUp ()
- If center_lon < 171 Then
-
- center_lon = Int(center_lon) + 10
- center_lon_rad = center_lon * DEG2RAD
- disp_lon.Caption = Str$(center_lon)
- disp_lon.Refresh
- End If
- End Sub
- Sub spin_zoom_SpinDown ()
- If zoom > 1 Then
- zoom = zoom - 1
- disp_zoom.Caption = Str$(zoom)
- disp_zoom.Refresh
- End If
- End Sub
- Sub spin_zoom_SpinUp ()
- 'If zoom < 25 Then
- zoom = zoom + 1
- disp_zoom.Caption = Str$(zoom)
- disp_zoom.Refresh
- 'End If
- End Sub
- Sub unplot_line (x As Single, Y As Single, pt As Integer, latlon() As Double)
- Dim xx As Double
- Dim yy As Double
- Dim outx As Double
- Dim outy As Double
- Dim out_lat As Double
- Dim out_lon As Double
- Dim mid_lat As Double
- Dim mid_lon As Double
- Dim inc As Integer
- Dim line_break As Integer
- If Sqr((x - ref_center_x) ^ 2 + (ref_center_y - Y) ^ 2) > ref_radius Then
- Exit Sub
- End If
- stat = ortho(latlon(pt - 1, 0) * DEG2RAD, latlon(pt - 1, 1) * DEG2RAD, outx, outy)
- xx = outx + ref_center_x
- yy = ref_center_y - outy
- If stat <> -1 Then
- Line (xx - 1, yy - 1)-(xx + 1, yy + 1), RGB(255, 255, 255), B
- End If
- If pt > 1 Then
-
- out_lat = latlon(pt - 1, 0)
- out_lon = latlon(pt - 1, 1)
-
- mid_lat = (latlon(pt - 2, 0) - out_lat) / LINE_DENSITY
- mid_lon = (latlon(pt - 2, 1) - out_lon) / LINE_DENSITY
-
- oldx = xx
- oldy = yy
-
- line_break = False
-
- For inc = 1 To LINE_DENSITY
-
- If -1 <> ortho((out_lat + mid_lat) * DEG2RAD, (out_lon + mid_lon) * DEG2RAD, outx, outy) Then
- xx = oldx
- yy = oldy
- oldx = outx + ref_center_x
- oldy = ref_center_y - outy
- If line_break = False Then
- Line (oldx, oldy)-(xx, yy), RGB(255, 255, 255)
- End If
- line_break = False
- Else
- line_break = True
- End If
-
- out_lat = out_lat + mid_lat
- out_lon = out_lon + mid_lon
-
- Next inc
- End If
- End Sub
-