Social Traffic Information Menggunakan Layanan Berbasis Lokasi Pada Android Platform
TUGAS AKHIR
Sebagai Persyaratan Guna Meraih Gelar Sarjana Strata 1 Teknik Informatika Universitas Muhammadiyah Malang
Oleh : Dicky Indra Pradana Gaffar 07560042
JURUSAN TEKNIK INFORMATIKA FAKULTAS TEKNIK UNIVERSITAS MUHAMMADIYAH MALANG 2013
LEMBAR PENGESAHAN
Social Traffic Information Menggunakan Layanan Berbasis Lokasi Pada Android Platform
TUGAS AKHIR Sebagai Persyaratan Guna Meraih Gelar Sarjana Strata 1 Teknik Informatika Universitas Muhammadiyah Malang
Disusun Oleh : Dicky Indra Pradana Gaffar 07560042
Tugas Akhir ini telah diuji dan dinyatakan lulus melalui sidang majelis penguji pada tanggal 11 Januari 2013 Menyetujui
Penguji I
Penguji II
Yuda Munarko, S.Kom, M.Sc NIP : 10806110443
Aminudin, S.Kom NIP :
Mengetahui Ketua Jurusan Teknik Informatika
Eko Budi Cahyono, S.Kom, MT NIP : 10895040330
KATA PENGANTAR
Dengan memanjatkan puji syukur kehadirat Allah SWT. Atas limpahan rahmat dan hidayah-NYA sehingga peneliti dapat menyelesaikan tugas Akhir yang berjudul : “SOCIAL
TRAFFIC
INFORMATION
MENGGUNAKAN
LAYANAN BERBASIS LOKASI PADA ANDROID PLATFORM” Di dalam tulisan ini akan disajikan pokok bahasan yang meliputi proses pencarian informasi lalu lintas terdekat dengan user berada menggunakan layanan berbasis lokasi sampai proses update dan request informasi lalu lintas. Pada sistem yang dikembangkan, digunakan algoritma Dijkstra untuk pencarian informasi lalu lintas terdekat dengan user berada serta penggunaan web service tipe SOAP untuk komunikasi data. Peneliti menyadari sepenuhnya bahwa dalam tulisan tugas akhir ini masih banyak kekurangan dan keterbatasan. Oleh karena itu peneliti mengharapkan saran yang membangun agar tulisan ini bermanfaat bagi perkembangan ilmu pengetahuan kedepan. Akhir kata penulis mengucapkan terimakasih kepada semua pihak yang telah membantu hingga tugas akhir ini terselesaikan.
Malang, 29 Januari 2013
Dicky Indra Pradana
DAFTAR ISI
KATA PENGANTAR........................................................................................................ i DAFTAR ISI .................................................................................................................... iv DAFTAR GAMBAR........................................................................................................ vi DAFTAR TABEL .......................................................................................................... viii DAFTAR LAMPIRAN ................................................................................................. viiii BAB I PENDAHULUAN.................................................................................................. 1 1.1. Latar Belakang ......................................................................................................... 1 1.2. Rumusan Masalah .................................................................................................... 2 1.3. Batasan Masalah ...................................................................................................... 2 1.4. Tujuan ...................................................................................................................... 2 1.5. Metodologi ............................................................................................................... 3 1.6. Sistematika Penulisan .............................................................................................. 3 BAB II LANDASAN TEORI ........................................................................................... 5 2.1. Social Information ................................................................................................... 5 2.2. Traffic Information .................................................................................................. 6 2.3. LBS (Location Based Service) ................................................................................. 7 2.3.1. Definisi LBS ..................................................................................................... 7 2.3.2. Komponen LBS ................................................................................................ 8 2.4. Aplikasi Mobile ....................................................................................................... 9 2.5. Android Platform. .................................................................................................. 11 2.5.1. Pengertian Android Platform .......................................................................... 11 2.5.2. Arsitektur Android .......................................................................................... 12 2.5.3. Fundamental Aplikasi ..................................................................................... 14 2.5.4. Fitur Android Platform ................................................................................... 16 2.6. Algoritma Dijkstra ................................................................................................. 16 2.6.1. Skema Umum Algoritma Djikstra .................................................................. 17 BAB III ANALISA DAN PERANCANGAN SISTEM ................................................ 19 3.1. Analisa Sistem ....................................................................................................... 19 3.2. Perancangan Sistem ............................................................................................... 21 3.2.1. Arsitektur Sistem............................................................................................. 22
3.2.2. Use Case Diagram ........................................................................................... 33 3.2.3. ERD (Entity Relationship Diagram) ............................................................... 44 BAB IV IMPLEMENTASI DAN PENGUJIAN .......................................................... 45 4.1. Lingkungan Implementasi...................................................................................... 45 4.1.1. Lingkungan Perangkat Keras .......................................................................... 45 4.1.2. Lingkungan Perangkat Lunak ......................................................................... 45 4.2. Implementasi Sistem .............................................................................................. 46 4.2.1. Implementasi Database dan Stored Procedure ............................................... 46 4.2.2. Implementasi Aplikasi Server ......................................................................... 53 4.2.3. Implementasi Aplikasi Layanan User ............................................................. 63 4.3. Pengujian Sistem .................................................................................................... 76 BAB V KESIMPULAN DAN SARAN .......................................................................... 80 5.1. Kesimpulan ........................................................................................................... 80 5.2. Saran ..................................................................................................................... 80 DAFTAR PUSTAKA ...................................................................................................... 82
DAFTAR GAMBAR
Gambar 2.1 LBS (Location Based Service)[10] ................................................................. 8 Gambar 2.2 Arsitektur Android[9].................................................................................... 14 Gambar 2.3 Graph Dijkstra[11] ........................................................................................ 17 Gambar 3.1 Dekomposisi Diagram ................................................................................... 21 Gambar 3.2 Arsitektur Sistem........................................................................................... 22 Gambar 3.3 Flowchart Pencarian Info Lalu Lintas Terdekat ............................................ 25 Gambar 3.4 Flowchart VertexByLocation() ...................................................................... 27 Gambar 3.5 Flowchart VertexByEuclidean() .................................................................... 28 Gambar 3.6 Flowchart Penghitungan Bobot Jarak Tiap Vertex ....................................... 29 Gambar 3.7 Skema Proses Reverse Geocoding ................................................................ 30 Gambar 3.8 Use Case Diagram Layanan .......................................................................... 34 Gambar 3.9 Entity Relationship Diagram ......................................................................... 44 Gambar 4.1 Stored Procedure register .............................................................................. 47 Gambar 4.2 Stored Procedure login .................................................................................. 48 Gambar 4.3 Stored Procedure get_data............................................................................. 49 Gambar 4.4 Stored Procedure update_info_lalin .............................................................. 50 Gambar 4.5 Stored Procedure cek_update ........................................................................ 51 Gambar 4.6 Stored Procedure request_info_lalin ............................................................. 52 Gambar 4.7 Stored Procedure info_terdekat ..................................................................... 52 Gambar 4.8 Implementasi Web Service pada Netbeans ................................................... 53 Gambar 4.9 RegisterService ............................................................................................. 54 Gambar 4.10 LoginService ............................................................................................... 55 Gambar 4.11 GetDataService ........................................................................................... 55 Gambar 4.12 UpdateInfoService....................................................................................... 56 Gambar 4.13 RequestInfoService ..................................................................................... 57 Gambar 4.14 Method InfoTerdekat .................................................................................. 59 Gambar 4.15 Method initVertext ...................................................................................... 60 Gambar 4.16 Method cariVertexByLocation.................................................................... 61 Gambar 4.17 Method PerhitunganEuclidean .................................................................... 61 Gambar 4.18 Method CariVertexByEuclidean ................................................................. 62 Gambar 4.19 Class Djikstra .............................................................................................. 62 Gambar 4.20 Class Vertex ................................................................................................ 63 Gambar 4.21 Class Edge ................................................................................................... 63 Gambar 4.22 Tampilan Menu Login................................................................................. 64 Gambar 4.23 LoginActivity .............................................................................................. 64 Gambar 4.24 Tampilan Menu Register ............................................................................. 65 Gambar 4.25 RegisterActivity .......................................................................................... 66 Gambar 4.26 Tampilan Menu Update Info Lalu Lintas .................................................... 66 Gambar 4.27 UpdateInfoActivity ..................................................................................... 67 Gambar 4.28 Method getUserLocation() .......................................................................... 68
Gambar 4.29 Method ConvertPointToLocation() ............................................................. 68 Gambar 4.30 Tampilan Menu Request Info Lalu Lintas .................................................. 69 Gambar 4.31 RequestInfoActivity .................................................................................... 70 Gambar 4.32 Method getUserLocation() .......................................................................... 70 Gambar 4.33 Method ConvertPointToLocation() ............................................................. 71 Gambar 4.34 Tampilan Hasil Request Informasi Lalu Lintas .......................................... 71 Gambar 4.35 HasilRequestActivity .................................................................................. 72 Gambar 4.36 Tampilan Menu View Map ......................................................................... 73 Gambar 4.37 ViewMapActivity........................................................................................ 74 Gambar 4.38 Tampilan Pencarian Info Lalu Lintas Terdekat........................................... 75 Gambar 4.39 HasilInfoTerdekatActivity .......................................................................... 75 Gambar 4.40 Method getUserLocation() .......................................................................... 76 Gambar 4.41 Method ConvertPointToLocation() ............................................................. 76
DAFTAR TABEL
Tabel 3.1 Definisi Aktor Use Case ................................................................................... 34 Tabel 3.2 Definisi UC-01 Register ................................................................................... 35 Tabel 3.3 Definisi UC-02 Login ....................................................................................... 36 Tabel 3.4 Definisi UC-03 Update Info Lalu Lintas .......................................................... 38 Tabel 3.5 Definisi UC-04 Request Info Lalu Lintas ......................................................... 39 Tabel 3.6 Definisi UC-05 Info Lalu Lintas Terdekat ........................................................ 41 Tabel 3.7 Definisi UC-06 View Map ................................................................................ 42 Tabel 4.1 Tabel user .......................................................................................................... 46 Tabel 4.2 Tabel info_lalin ................................................................................................. 46 Tabel 4.3 Tabel Pengujian Waktu Transfer Data Client dengan Server ........................... 77 Tabel 4.4 Tabel Pengujian Waktu Komputasi Server untuk Mencari Info Lalu Lintas Terdekat…...……………………………………………………………………………..78
DAFTAR LAMPIRAN
Lampiran 1: Tabel Uji Coba Implementasi Algoritma Dijkstra ...................................... 83 Lampiran 2: Tabel Uji Coba Auto-Update Menu Info Lalu Lintas Terdekat ................... 84
DAFTAR PUSTAKA [1]
AAAI.2008. Social Information Processing Symposium.California: AAAI Spring Symposium, Stanford University.
[2]
Asad, Taimur.2011. Android 2.3.3 Platform, New NFC Capabilities.
[3]
Avestro Joyce.2007. Java Education Network Indonesia (JENI). Jardiknas Indonesia.
[4]
Ferrydiansyah, Reza.2002. Aplikasi Mobile. http://www.cse.msu.edu/~ferrydia/downloads/Presentation_Mobile_Applica tion.pdf. Diakses 1 September 2012 pukul (19.24) WIB.
[5]
Lerman, Kristina.2007. Social Information Processing in Social News Aggregation. California: University of Southern California.
[6]
Lubis, Henny. 2009. Perbandingan Algoritma Greedy dan Dijsktra Untuk Menentukan Lintasan Terpendek. Medan : Universitas Sumatera Utara.
[7]
Munir, Rinaldi.2000. Algoritma dan Pemrograman (Buku 1). Bandung : Informatika.
[8]
Pradhana, Bayu. Studi dan Implementasi Persoalan Lintasan Terpendek Suatu Graf Dengan Algoritma Dijkstra dan Algoritma Bellman-Ford.2007. Bandung : Institut Teknologi Bandung.
[9]
Safaat H, Nazruddin.2011. Android, Pemrograman Aplikasi Mobile Smartphone dan Tablet PC Berbasis Android.
[10] Stefan Steiniger, Moritz Neun and Alistair Edwardes.2004. Foundations of Location Based Service. Switzerland : University Of Zurich. [11] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein.2009. Introduction to Algorithm (Third Edition). Cambridge : MIT Press .