• Tidak ada hasil yang ditemukan

' Membaca Citra Dim Buffer(5228, 1269) As Single Open "K:\Visual_Basic\Data\darisurfer6" For Binary Access Read As #1

N/A
N/A
Protected

Academic year: 2021

Membagikan "' Membaca Citra Dim Buffer(5228, 1269) As Single Open "K:\Visual_Basic\Data\darisurfer6" For Binary Access Read As #1"

Copied!
12
0
0

Teks penuh

(1)

Daftar Pustaka

http://www.mail-archive.com/programmer-vb@yahoogroups.com/msg13645.html

Amhar, Fahmi. 1999. Mengenal Ortofoto Sejati dan Model Kota 3D, Survey dan Pemetaan, Vol XII No 5, Oktober 1999, . ITB. Bandung. Indonesia, hal 41-50.

ERDAS. 1999. Fifth edition, Revised, Expanded, Field Guide. Atlanta, Georgia. USA.

Herman, Yuliana. 2005. Kajian Ketelitian Planimetrik Citra Satelit Quickbird Dalam Memproduksi Peta Garis Skala Besar. Tugas Akhir, FTSL, ITB. Bandung. Indonesia Hikmat, Agus, Fahmi Amhar, Saeful Rachman, 1999. Analisis Penggunaan Metode Interpolasi

Moving (Weighted) Averages, Survey dan Pemetaan, Vol XII No 5, Oktober 1999, ITB. Bandung. Indonesia, hal 1-12.

Purnamawati, Indry. 2005. Pertimbangan Akuisisi Data 3D Untuk Peta Kota 3D Dari Foto, Tugas Akhir, FTSL, ITB. Bandung. Indonesia

Santoso, Bobby. 2001. Pengantar Fotogrametri. Penerbit ITB. Bandung. Indonesia.

Sujatmiko, Opisar. 1988. Penerapan Overlay Dalam Analisis Nilai Tanah Pedesaan Menuju Sistem Informasi Pertanahan Daerah Pedesaan, Tugas Akhir. ITB. Bandung. Indonesia. Wolf, P. R. 1995. Elemen Fotogrametri. Gadjah Mada University Press. Yogyakarta. Indonesia.

(2)

1. Modul Metode Nearest Neighbor Private Sub Form_Load()

Dim Xo As Single Dim Yo As Single Dim XaUTM As Single Dim YaUTM As Single Dim ResX As Single Dim ResY As Single Dim XaPixel As Long Dim YaPixel As Long

Dim TinggiGedungFoto As Single Dim TinggiDTM As Single Dim Panjang_Citra As Integer Dim Lebar_Citra As Integer Dim DeltaH As Single ' Membaca Citra

Dim Buffer(5228, 1269) As Single

Open "K:\Visual_Basic\Data\darisurfer6" For Binary Access Read As #1 Panjang_Citra = 18 Lebar_Citra = 21 For i = 0 To Panjang_Citra - 1 For j = 0 To Lebar_Citra - 1 Get #1, , Buffer(i, j) Next j Next i

'Untuk menutup file Close #1 Xo = 787820.849999 Yo = 9238465.29411 ResX = 50# ResY = 50# txtXo.Text = Xo txtYo.Text = Yo txtResX.Text = ResX txtResY.Text = ResY Panjang.Text = Panjang_Citra Lebar.Text = Lebar_Citra

(3)

Dim X As Double Dim Y As Double Dim IDGD As Integer Dim JmlhPojok As Integer

Open "K:\Visual_Basic\Data\Input.txt" For Input As #2

Open "K:\Visual_Basic\Hasil\Hasil_NearestNeighbour.txt" For Output As #5 Do While Not EOF(2) ' Loop until end of file.

Input #2, IDGD, JmlhPojok Write #5, IDGD, JmlhPojok For i = 1 To JmlhPojok Input #2, X, Y, TinggiGedungFoto XaUTM = X YaUTM = Y txtXaUTM.Text = XaUTM txtYaUTM.Text = YaUTM txtTinggiGedungFoto.Text = TinggiGedungFoto TinggiGedungFoto = txtTinggiGedungFoto.Text

txtXaPixel.Text = Round((XaUTM - Xo) / ResX) txtYaPixel.Text = Round((Yo - YaUTM) / ResY)

txtTinggiDTM.Text = Buffer(txtXaPixel.Text, txtYaPixel.Text)

txtTinggiGedung.Text = txtTinggiGedungFoto.Text - txtTinggiDTM.Text TinggiDTM = txtTinggiDTM.Text

DeltaH = txtTinggiGedung.Text

Write #5, X, Y, TinggiGedungFoto, TinggiDTM, DeltaH Next i Loop Close #5 Close #2 Close #1 End Sub

(4)

2. Modul Metode Cubic Interpolation Private Sub Form_Load()

Dim Xo As Single Dim Yo As Single Dim XaUTM As Single Dim YaUTM As Single Dim ResX As Single Dim ResY As Single Dim XaPixel As Long Dim YaPixel As Long

Dim TinggiGedungFoto As Double Dim TinggiDTM As Single

Dim Panjang_Citra As Integer Dim Lebar_Citra As Integer Dim DeltaH As Single 'Membaca citra

Dim Buffer(5228, 1269) As Single

Open "K:\Visual_Basic\Data\darisurfer6" For Binary Access Read As #1 Panjang_Citra = 18 Lebar_Citra = 21 For i = 0 To Panjang_Citra - 1 For j = 0 To Lebar_Citra - 1 Get #1, , Buffer(i, j) Next j Next i

'Untuk menutup file Close #1 Xo = 787820.849999 Yo = 9238465.29411 ResX = 50# ResY = 50# txtXo.Text = Xo txtYo.Text = Yo txtResX.Text = ResX txtResY.Text = ResY Panjang.Text = Panjang_Citra Lebar.Text = Lebar_Citra

(5)

'Pembacaan data input/output Dim X As Double

Dim Y As Double Dim IDGD As Integer Dim JmlhPojok As Integer

Open "K:\Visual_Basic\Data\Input.txt" For Input As #2

Open "K:\Visual_Basic\Hasil\Hasil_Cubic.txt" For Output As #5 'Loop until end of file

Do While Not EOF(2)

Input #2, IDGD, JmlhPojok Write #5, IDGD, JmlhPojok For i = 1 To JmlhPojok Input #2, X, Y, TinggiGedungFoto XaUTM = X YaUTM = Y txtXaUTM.Text = XaUTM txtYaUTM.Text = YaUTM txtTinggiGedungFoto.Text = TinggiGedungFoto TinggiGedungFoto = txtTinggiGedungFoto.Text

txtXaPixel.Text = (XaUTM - Xo) / ResX txtYaPixel.Text = (Yo - YaUTM) / ResY

'Pendefinisian letak jatuhnya titik objek di piksel Dim Nx, Ny As Variant

Dim posisi1, posisi2, posisi3, posisi4 As Integer Dim rangeX, rangeY As Integer

rangeX = Mid(txtXaPixel, InStr(txtXaPixel, ".")) rangeY = Mid(txtYaPixel, InStr(txtYaPixel, ".")) Nx = Split(Str(txtXaPixel), ".") Ny = Split(Str(txtYaPixel), ".") If rangeX < 0.5 Then posisi1 = Nx(0) posisi2 = Nx(0) + 1 Text1.Text = posisi1 Text2.Text = posisi2 Else posisi1 = Nx(0) + 1

(6)

posisi2 = Nx(0) + 2 Text1.Text = posisi1 Text2.Text = posisi2 End If If rangeY < 0.5 Then posisi3 = Ny(0) posisi4 = Ny(0) + 1 Text3.Text = posisi3 Text4.Text = posisi4 Else posisi3 = Ny(0) + 1 posisi4 = Ny(0) + 2 Text3.Text = posisi3 Text4.Text = posisi4 End If

'Pendefisinian koordinat tengah tiap posisi pixel

Dim Xp1, Yp1, Xp2, Yp2, Xp3, Yp3, Xp4, Yp4 As Single Dim Z1, Z2, Z3, Z4 As Integer

Dim Xap, Yap As Integer

Dim dX1, dY1, dX2, dY2, dX3, dY3, dX4, dY4, D As Single Xp1 = posisi1 - 0.5 Yp1 = posisi3 - 0.5 Xp2 = posisi2 - 0.5 Yp2 = posisi3 - 0.5 Xp3 = posisi1 - 0.5 Yp3 = posisi4 - 0.5 Xp4 = posisi2 - 0.5 Yp4 = posisi4 - 0.5 Z1 = Buffer(Xp1, Yp1) Z2 = Buffer(Xp2, Yp2) Z3 = Buffer(Xp3, Yp3) Z4 = Buffer(Xp4, Yp4) Xap = txtXaPixel.Text Yap = txtYaPixel.Text D = txtResX.Text D = txtResY.Text dX1 = Abs(Xap - Xp1) * 50 dY1 = Abs(Yap - Yp1) * 50 dX2 = Abs(Xap - Xp2) * 50 dY2 = Abs(Yap - Yp2) * 50 dX3 = Abs(Xap - Xp3) * 50

(7)

dY3 = Abs(Yap - Yp3) * 50 dX4 = Abs(Xap - Xp4) * 50 dY4 = Abs(Yap - Yp4) * 50

txtTinggiDTM.Text = (((D - dX1) * (D - dY1) * Z1) + ((D - dX2) * (D - dY2) * Z2) + ((D - dX3) * (D - dY3) * Z3) + ((D - dX4) * (D - dY4) * Z4)) / D ^ 2

txtTinggiGedung.Text = txtTinggiGedungFoto.Text - txtTinggiDTM.Text

TinggiDTM = txtTinggiDTM.Text

DeltaH = txtTinggiGedung.Text

Write #5, X, Y, TinggiGedungFoto, TinggiDTM, DeltaH Next i Loop Close #5 Close #2 Close #1 End Sub

3. Modul Metode BiCubic Interpolation Private Sub Form_Load()

Dim Xo As Single Dim Yo As Single Dim XaUTM As Single Dim YaUTM As Single Dim ResX As Single Dim ResY As Single Dim XaPixel As Long Dim YaPixel As Long

Dim TinggiGedungFoto As Double Dim TinggiDTM As Single

Dim Panjang_Citra As Integer Dim Lebar_Citra As Integer Dim DeltaH As Single 'Membaca citra

(8)

Open "K:\Visual_Basic\Data\darisurfer6" For Binary Access Read As #1 Panjang_Citra = 18 Lebar_Citra = 21 For i = 0 To Panjang_Citra - 1 For J = 0 To Lebar_Citra - 1 Get #1, , Buffer(i, J) Next J Next i

'Untuk menutup file Close #1 Xo = 787820.849999 Yo = 9238465.29411 ResX = 50# ResY = 50# txtXo.Text = Xo txtYo.Text = Yo txtResX.Text = ResX txtResY.Text = ResY Panjang.Text = Panjang_Citra Lebar.Text = Lebar_Citra 'Pembacaan data input/output Dim X As Double

Dim Y As Double Dim IDGD As Integer Dim JmlhPojok As Integer

Open "K:\Visual_Basic\Data\Input.txt" For Input As #2

Open "K:\Visual_Basic\Hasil\Hasil_BiCubic.txt" For Output As #5 'Loop until end of file

Do While Not EOF(2)

Input #2, IDGD, JmlhPojok Write #5, IDGD, JmlhPojok For i = 1 To JmlhPojok Input #2, X, Y, TinggiGedungFoto XaUTM = X YaUTM = Y txtXaUTM.Text = XaUTM

(9)

txtYaUTM.Text = YaUTM

txtTinggiGedungFoto.Text = TinggiGedungFoto TinggiGedungFoto = txtTinggiGedungFoto.Text

txtXaPixel.Text = (XaUTM - Xo) / ResX txtYaPixel.Text = (Yo - YaUTM) / ResY

'Pendefinisian letak jatuhnya titik objek di piksel Dim Nx, Ny As Variant

Dim posisi1, posisi2, posisi3, posisi4 As Integer Dim rangeX, rangeY As Integer

rangeX = Mid(txtXaPixel, InStr(txtXaPixel, ".")) rangeY = Mid(txtYaPixel, InStr(txtYaPixel, ".")) Nx = Split(Str(txtXaPixel), ".") Ny = Split(Str(txtYaPixel), ".") If rangeX < 0.5 Then posisi1 = Nx(0) posisi2 = Nx(0) + 1 Text1.Text = posisi1 Text2.Text = posisi2 Else posisi1 = Nx(0) + 1 posisi2 = Nx(0) + 2 Text1.Text = posisi1 Text2.Text = posisi2 End If If rangeY < 0.5 Then posisi3 = Ny(0) posisi4 = Ny(0) + 1 Text3.Text = posisi3 Text4.Text = posisi4 Else posisi3 = Ny(0) + 1 posisi4 = Ny(0) + 2 Text3.Text = posisi3 Text4.Text = posisi4 End If

'Pendefisinian koordinat tengah tiap posisi pixel

Dim Xp1, Yp1, Xp2, Yp2, Xp3, Yp3, Xp4, Yp4, Xp5, Yp5, Xp6, Yp6, Xp7, Yp7, Xp8, Yp8, Xp9, Yp9, Xp10, Yp10, Xp11, Yp11, Xp12, Yp12, Xp13, Yp13, Xp14, Yp14, Xp15, Yp15, Xp16, Yp16 As Single

Dim Z1, Z2, Z3, Z4, Z5, Z6, Z7, Z8, Z9, Z10, Z11, Z12, Z13, Z14, Z15, Z16 As Integer

(10)

Dim L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13, L14, L15, L16, L As Single Dim W1, W2, W3, W4, W5, W6, W7, W8, W9, W10, W11, W12, W13, W14, W15, W16, W As Single Xp1 = posisi1 - 0.5 Yp1 = posisi3 - 0.5 Xp2 = posisi2 - 0.5 Yp2 = posisi3 - 0.5 Xp3 = posisi1 - 0.5 Yp3 = posisi4 - 0.5 Xp4 = posisi2 - 0.5 Yp4 = posisi4 - 0.5 Xp5 = posisi1 - 1.5 Yp5 = posisi3 - 1.5 Xp6 = posisi2 - 1.5 Yp6 = posisi3 - 1.5 Xp7 = posisi1 + 0.5 Yp7 = posisi4 - 2.5 Xp8 = posisi2 + 0.5 Yp8 = posisi4 - 2.5 Xp9 = posisi1 - 1.5 Yp9 = posisi3 - 0.5 Xp10 = posisi2 + 0.5 Yp10 = posisi3 - 0.5 Xp11 = posisi1 - 1.5 Yp11 = posisi4 - 0.5 Xp12 = posisi2 + 0.5 Yp12 = posisi4 - 0.5 Xp13 = posisi1 - 1.5 Yp13 = posisi3 + 1.5 Xp14 = posisi2 - 1.5 Yp14 = posisi3 + 1.5 Xp15 = posisi1 + 0.5 Yp15 = posisi4 + 0.5 Xp16 = posisi2 + 0.5 Yp16 = posisi4 + 0.5 Z1 = Buffer(Xp1, Yp1) Z2 = Buffer(Xp2, Yp2) Z3 = Buffer(Xp3, Yp3) Z4 = Buffer(Xp4, Yp4) Z5 = Buffer(Xp5, Yp5) Z6 = Buffer(Xp6, Yp6) Z7 = Buffer(Xp7, Yp7) Z8 = Buffer(Xp8, Yp8) Z9 = Buffer(Xp9, Yp9)

(11)

Z10 = Buffer(Xp10, Yp10) Z11 = Buffer(Xp11, Yp11) Z12 = Buffer(Xp12, Yp12) Z13 = Buffer(Xp13, Yp13) Z14 = Buffer(Xp14, Yp14) Z15 = Buffer(Xp15, Yp15) Z16 = Buffer(Xp16, Yp16) Xap = txtXaPixel.Text Yap = txtYaPixel.Text D = txtResX.Text D = txtResY.Text

L1 = (((Xap - Xp1) ^ 2 + (Yap - Yp1) ^ 2) ^ 0.5) L2 = (((Xap - Xp2) ^ 2 + (Yap - Yp2) ^ 2) ^ 0.5) L3 = (((Xap - Xp3) ^ 2 + (Yap - Yp3) ^ 2) ^ 0.5) L4 = (((Xap - Xp4) ^ 2 + (Yap - Yp4) ^ 2) ^ 0.5) L5 = (((Xap - Xp5) ^ 2 + (Yap - Yp5) ^ 2) ^ 0.5) L6 = (((Xap - Xp6) ^ 2 + (Yap - Yp6) ^ 2) ^ 0.5) L7 = (((Xap - Xp7) ^ 2 + (Yap - Yp7) ^ 2) ^ 0.5) L8 = (((Xap - Xp8) ^ 2 + (Yap - Yp8) ^ 2) ^ 0.5) L9 = (((Xap - Xp9) ^ 2 + (Yap - Yp9) ^ 2) ^ 0.5) L10 = (((Xap - Xp10) ^ 2 + (Yap - Yp10) ^ 2) ^ 0.5) L11 = (((Xap - Xp11) ^ 2 + (Yap - Yp11) ^ 2) ^ 0.5) L12 = (((Xap - Xp12) ^ 2 + (Yap - Yp12) ^ 2) ^ 0.5) L13 = (((Xap - Xp13) ^ 2 + (Yap - Yp13) ^ 2) ^ 0.5) L14 = (((Xap - Xp14) ^ 2 + (Yap - Yp14) ^ 2) ^ 0.5) L15 = (((Xap - Xp15) ^ 2 + (Yap - Yp15) ^ 2) ^ 0.5) L16 = (((Xap - Xp16) ^ 2 + (Yap - Yp16) ^ 2) ^ 0.5) L = L1 + L2 + L3 + L4 + L5 + L6 + L7 + L8 + L9 + L10 + L11 + L12 + L13 + L14 + L15 + L16 W1 = L1 / L W2 = L2 / L W3 = L3 / L W4 = L4 / L W5 = L5 / L W6 = L6 / L W7 = L7 / L W8 = L8 / L W9 = L9 / L W10 = L10 / L W11 = L11 / L W12 = L12 / L W13 = L13 / L W14 = L14 / L W15 = L15 / L W16 = L16 / L

(12)

W = W1 + W2 + W3 + W4 + W5 + W6 + W7 + W8 + W9 + W10 + W11 + W12 + W13 + W14 + W15 + W16 txtTinggiDTM.Text = ((Z1 * W1) / (Z2 * W2) + (Z3 * W3) + (Z4 * W4) + (Z5 * W5) + (Z6 * W6) + (Z7 * W7) + (Z8 * W8) + (Z9 * W9) + (Z10 * W10) + (Z11 * W11) + (Z12 * W12) + (Z13 * W13) + (Z14 * Wd14) + (Z15 * W15) + (Z16 * W16))

txtTinggiGedung.Text = txtTinggiGedungFoto.Text - txtTinggiDTM.Text TinggiDTM = txtTinggiDTM.Text

DeltaH = txtTinggiGedung.Text

Write #5, X, Y, TinggiGedungFoto, TinggiDTM, DeltaH Next i Loop Close #2 Close #1 End Sub

Referensi

Dokumen terkait

Material pengujian yang digunakan adalah komposit dengan serat penguat sera/ karung (Hibiscus Cannabius) , abaka (Musa Texti//is Nee) dan enceng gondok (Eicchornia

Sebab ada tiga yang memberi kesaksian (di dalam sorga: Bapa, Firman dan Roh Kudus; dan ketiganya adalah satu. Dan ada tiga yang memberi kesaksian di bumi): Roh dan air dan darah

Banyak hal yang kemudian berubah di abad 21 ini, percepatan di bidang ilmu pengetahuan dan teknologi, sistem komunikasi seperti mudahnya akses internet menjadi salah satu ciri abad

Jenis tanah ini berasal dari bahan induk organik seperti dari hutan rawa atau rumput rawa, dengan ciri dan sifat: tidak terjadi deferensiasi horizon secara jelas, ketebalan lebih

Sultan Alauddin Riyat Syah adalah sultan Aceh ketiga. Sultan Alauddin Riyat Syah meletakan dasardasar kebesaran Kesultanan Aceh. Untuk menghadapi ancaman Portugis,

9 Harga shampoo pantene yang saya ketahui selalu setabil tidak berubah-ubah 10 Produk Pantene memiliki banyak pilihan jenis yang dapat saya pilih sesuai dengan

Dengan demikian disimpulkan bahwa penerapan model pembelajaran kooperatif tipe Numbered Heads Together (NHT) pada materi gerak tumbuhan dapat mencapai target motivasi

 Permasalahan di daerah Citarum Hulu disebabkan oleh berkurangnya fungsi kawasan lindung (hutan dan non hutan), berkembangnya permukiman tanpa perencanaanyang