.
(Bagian ini berasal dari Horning, N., K. Koy, P. Ersts. 2009. eVis (v1.1.0) User’s Guide. American Museum of Natural History, Center for Biodiversity and Conservation. Tersedia di http://biodiversityinformatics.amnh.org/, dan dirilis di bawah GNU FDL.)
The Biodiversity Informatics Facility at the American Museum of Natural History’s (AMNH) Center for Biodiversity and Conservation (CBC) has developed the Event Visualization Tool (eVis), another software tool to add to the suite of conservation monitoring and decision support tools for guiding protected area and landscape planning. This plugin enables users to easily link geocoded (i.e., referenced with latitude and longitude or X and Y coordinates) photographs, and other supporting documents, to vector data in QGIS.
eVis is now automatically installed and enabled in new versions of QGIS, and as with all plugins, it can be disabled and enabled using the Plugin Manager (see The Plugins Dialog).
Plugin Evis terdiri dari tiga modul: ‘Alat sambungan basisdata’, ‘Alat ID Event’, dan ‘Navigasi Event’. Bekerja sama untuk melihat foto geocoded dan dokumen lain yang terkait dengan fitur disimpan dalam berkas vektor, database, atau spreadsheet.
The Event Browser module provides the functionality to display geocoded photographs that are linked to vector features displayed in the QGIS map window. Point data, for example, can be from a vector file that can be input using QGIS or it can be from the result of a database query. The vector feature must have attribute information associated with it to describe the location and name of the file containing the photograph and, optionally, the compass direction the camera was pointed when the image was acquired. Your vector layer must be loaded into QGIS before running the Event Browser.
Meluncurkan Modul Navigasi Kegiatan, klik Basisdata ‣ eVis ‣ eVis Navigasi Kegiatan. Akan membuka jendela Navigasi Kegiatan Umum.
The Event Browser window has three tabs displayed at the top of the window. The Display tab is used to view the photograph and its associated attribute data. The Options tab provides a number of settings that can be adjusted to control the behavior of the eVis plugin. Lastly, the Configure External Applications tab is used to maintain a table of file extensions and their associated application to allow eVis to display documents other than images.
Melihat jendela Tampilan, klik tab Tampilan di jendela Navigasi Kegiatan. Jendela Tampilan digunakan untuk melihat foto-foto geocoded dan data atribut yang terkait.
Figure eVis 1:
Jendela Tampilan: Sebuah jendela di mana foto itu akan muncul.
Tombol memperbesar: Memperbesar untuk melihat lebih detil. Jika seluruh gambar tidak dapat ditampilkan di jendela layar, scroll bar akan muncul di sisi kiri dan bawah jendela untuk memungkinkan Anda untuk menjelajah gambar.
Tombol memperkecil: Memperkecil untuk melihat lebih banyak daerah.
Perbesar ke seluruh area: Menampilkan secara penuh dari foto.
Tombol navigasi: Gunakan tombol Sebelumnya dan Berikutnya untuk memuat fitur sebelumnya atau berikutnya ketika lebih dari satu fitur yang dipilih.
Figure eVis 2:
Path direktori dasar: Path dasar ke mana path relatif didefinisikan dalam Figure_eVis_2 (A) akan ditambahkan.
Ganti path: Jika kotak centang ini diperiksa, hanya nama berkas dari A akan ditambahkan ke basis path.
Ingat pengaturan: Jika kotak centang dicentang, nilai-nilai untuk parameter terkait akan disimpan untuk sesi berikutnya ketika jendela ditutup atau bila tombol ** [Simpan] ** di bawah ditekan.
Atur ulang nilai: Mengatur ulang nilai pada baris ini ke pengaturan default.
Kembali ke default: Ini akan mengatur ulang semua kolom ke pengaturan default. Memiliki efek yang sama seperti mengklik tombol [Atur Ulang].
Simpan: Akan menyimpan pengaturan tanpa menutup panel Opsi.
Figure eVis 3:
Tabel referensi berkas: Sebuah tabel yang berisi jenis berkas yang dapat dibuka dengan menggunakan eVis. Setiap jenis berkas membutuhkan ekstensi berkas dan path ke aplikasi yang dapat membuka jenis berkas. Hal ini memberikan kemampuan membuka berbagai berkas seperti film, rekaman suara, dan dokumen teks, bukan hanya gambar.
Tambah jenis berkas baru: Tambahkan jenis berkas baru dengan ekstensi yang unik dan path untuk aplikasi yang dapat membuka berkas.
Hapus baris saat ini: Menghapus jenis berkas yang disorot dalam tabel dan didefinisikan oleh ekstensi berkas dan path ke sebuah aplikasi terkait.
The location and name of the photograph can be stored using an absolute or relative path, or a URL if the photograph is available on a web server. Examples of the different approaches are listed in Table evis_examples.
X Y FILE BEARING
780596 1784017 C:\Workshop\eVis_Data\groundphotos\DSC_0168.JPG 275
780596 1784017 /groundphotos/DSC_0169.JPG 80
780819 1784015 http://biodiversityinformatics.amnh.org/\
evis_testdata/DSC_0170.JPG 10
780596 1784017 pdf:http://www.testsite.com/attachments.php?\
attachment_id-12 76
Supporting documents such as text documents, videos, and sound clips can also be displayed or played by eVis. To do this, it is necessary to add an entry in the file reference table that can be accessed from the Configure External Applications window in the Generic Event Browser that matches the file extension to an application that can be used to open the file. It is also necessary to have the path or URL to the file in the attribute table for the vector layer. One additional rule that can be used for URLs that don’t contain a file extension for the document you want to open is to specify the file extension before the URL. The format is — file extension:URL. The URL is preceded by the file extension and a colon; this is particularly useful for accessing documents from wikis and other web sites that use a database to manage the web pages (see Table evis_examples).
When the Event Browser window opens, a photograph will appear in the display window if the document referenced in the vector file attribute table is an image and if the file location information in the Options window is properly set. If a photograph is expected and it does not appear, it will be necessary to adjust the parameters in the Options window.
If a supporting document (or an image that does not have a file extension recognized by eVis) is referenced in the attribute table, the field containing the file path will be highlighted in green in the attribute information window if that file extension is defined in the file reference table located in the Configure External Applications window. To open the document, double-click on the green-highlighted line in the attribute information window. If a supporting document is referenced in the attribute information window and the file path is not highlighted in green, then it will be necessary to add an entry for the file’s filename extension in the Configure External Applications window. If the file path is highlighted in green but does not open when double-clicked, it will be necessary to adjust the parameters in the Options window so the file can be located by eVis.
If no compass bearing is provided in the Options window, a red asterisk will be displayed on top of the vector feature that is associated with the photograph being displayed. If a compass bearing is provided, then an arrow will appear pointing in the direction indicated by the value in the compass bearing display field in the Event Browser window. The arrow will be centered over the point that is associated with the photograph or other document.
Menutup jendela Navigasi kegiatan, klik tombol [Tutup] dari jendela Tampilan.
The ‘Event ID’ module allows you to display a photograph by clicking on a feature displayed in the QGIS map window. The vector feature must have attribute information associated with it to describe the location and name of the file containing the photograph and, optionally, the compass direction the camera was pointed when the image was acquired. This layer must be loaded into QGIS before running the ‘Event ID’ tool.
To launch the ‘Event ID’ module, either click on the Event ID icon or click on Database ‣ eVis ‣ Event ID Tool. This will cause the cursor to change to an arrow with an ‘i’ on top of it signifying that the ID tool is active.
To view the photographs linked to vector features in the active vector layer displayed in the QGIS map window, move the Event ID cursor over the feature and then click the mouse. After clicking on the feature, the Event Browser window is opened and the photographs on or near the clicked locality are available for display in the browser. If more than one photograph is available, you can cycle through the different features using the [Previous] and [Next] buttons. The other controls are described in the ref:evis_browser section of this guide.
Modul ‘Sambungan Basisdata’ menyediakan alat untuk menghubungkan dan query basisdata atau sumber daya ODBC lainnya, seperti spreadsheet.
eVis can directly connect to the following types of databases: PostgreSQL, MySQL, and SQLite; it can also read from ODBC connections (e.g., MS Access). When reading from an ODBC database (such as an Excel spreadsheet), it is necessary to configure your ODBC driver for the operating system you are using.
To launch the ‘Database Connection’ module, either click on the appropriate icon eVis Database Connection or click on Database ‣ eVis ‣ Database Connection. This will launch the Database Connection window. The window has three tabs: Predefined Queries, Database Connection, and SQL Query. The Output Console window at the bottom of the window displays the status of actions initiated by the different sections of this module.
Click on the Database Connection tab to open the database connection interface. Next, use the Database Type combo box to select the type of database that you want to connect to. If a password or username is required, that information can be entered in the Username and Password textboxes.
Enter the database host in the Database Host textbox. This option is not available if you selected ‘MS Access’ as the database type. If the database resides on your desktop, you should enter “localhost”.
Masukkan nama basisdata di kotak teks Nama Basisdata. Jika Anda memilih ‘ODBC’ sebagai tipe basisdata, Anda harus memasukkan nama sumber data.
When all of the parameters are filled in, click on the [Connect] button. If the connection is successful, a message will be written in the Output Console window stating that the connection was established. If a connection was not established, you will need to check that the correct parameters were entered above.
Figure eVis 4:
Tipe database: Sebuah daftar drop-down untuk menentukan jenis basisdata yang akan digunakan.
Host Basisdata: Nama host basisdata.
Port: Nomor port jika MySQL atau PostgreSQL tipe database yang dipilih.
Nama Basisdata: Nama dari basisdata.
Sambung: Sebuah tombol untuk menghubungkan ke basisdata menggunakan parameter yang didefinisikan di atas.
Keluaran Konsol: Jendela konsol di mana pesan yang terkait dengan pengolahan akan ditampilkan.
Namapengguna: Namapengguna/Username untuk digunakan ketika basisdata dilindungi kata sandi/password.
Kata sandi: Kata sandi/Password digunakan ketika basisdata dilindungi kata sandi.
Query yang ditentukan: Tab untuk membuka jendela “Query yang ditentukan”.
Sambungan Basisdata: Tab membuka jendela “Sambungan Basisdata”.
Query SQL: Tab membuka jendela “Query SQL”.
Bantuan: Tampilan bantuan dalam jaringan.
OK: Tutup jendela utama “Sambungan Basisdata”.
SQL queries are used to extract information from a database or ODBC resource. In eVis, the output from these queries is a vector layer added to the QGIS map window. Click on the SQL Query tab to display the SQL query interface. SQL commands can be entered in this text window. A helpful tutorial on SQL commands is available at http://www.w3schools.com/sql. For example, to extract all of the data from a worksheet in an Excel file, select * from [sheet1$] where sheet1 is the name of the worksheet.
Click on the [Run Query] button to execute the command. If the query is successful, a Database File Selection window will be displayed. If the query is not successful, an error message will appear in the Output Console window.
Di jendela Pilih Berkas Basisdata, masukkan nama lapisan yang akan dibuat dari hasil query dalam kotak teks Nama Lapisan Baru.
Figure eVis 5:
Jendela Teks Query SQL: Sebuah layar untuk mengetik query-query SQL.
Jalankan Query: Tombol untuk mengeksekusi query dimasukkan dalam Jendela Query SQL.
Jendela Konsol: Jendela konsol di mana pesan yang terkait dengan pengolahan akan ditampilkan.
Bantuan: Tampilan bantuan dalam jaringan.
OK: Menutup jendela Sambungan Basisdata.
Use the X Coordinate and Y Coordinate combo boxes to select the fields from the database that stores the X (or longitude) and Y (or latitude) coordinates. Clicking on the [OK] button causes the vector layer created from the SQL query to be displayed in the QGIS map window.
To save this vector file for future use, you can use the QGIS ‘Save as...’ command that is accessed by right-clicking on the layer name in the QGIS map legend and then selecting ‘Save as...’
Tip
Membuat lapisan vektor dari Microsoft Excel Worksheet
When creating a vector layer from a Microsoft Excel Worksheet, you might see that unwanted zeros (“0”) have been inserted in the attribute table rows beneath valid data. This can be caused by deleting the values for these cells in Excel using the Backspace key. To correct this problem, you need to open the Excel file (you’ll need to close QGIS if you are connected to the file, to allow you to edit the file) and then use Edit ‣ Delete to remove the blank rows from the file. To avoid this problem, you can simply delete several rows in the Excel Worksheet using Edit ‣ Delete before saving the file.
With predefined queries, you can select previously written queries stored in XML format in a file. This is particularly helpful if you are not familiar with SQL commands. Click on the Predefined Queries tab to display the predefined query interface.
To load a set of predefined queries, click on the Open File icon. This opens the Open File window, which is used to locate the file containing the SQL queries. When the queries are loaded, their titles as defined in the XML file will appear in the drop-down menu located just below the Open File icon. The full description of the query is displayed in the text window under the drop-down menu.
Select the query you want to run from the drop-down menu and then click on the SQL Query tab to see that the query has been loaded into the query window. If it is the first time you are running a predefined query or are switching databases, you need to be sure to connect to the database.
Click on the [Run Query] button in the SQL Query tab to execute the command. If the query is successful, a Database File Selection window will be displayed. If the query is not successful, an error message will appear in the Output Console window.
Figure eVis 6:
Buka Berkas: Meluncurkan “Buka Berkas” navigasi berkas untuk mencari berkas XML memegang query yang telah ditetapkan.
Query Ditentukan: Sebuah daftar drop-down dengan semua query yang didefinisikan oleh query berkas XML yang telah ditetapkan.
Deskripsi Query: Sebuah deskripsi singkat dari query. Deskripsi ini adalah dari query yang telah ditentukan berkas XML.
Jendela Konsol: Jendela konsol di mana pesan yang terkait dengan pengolahan akan ditampilkan.
Bantuan: Tampilan bantuan dalam jaringan.
OK: Tutup jendela utama “Sambungan Basisdata”.
Tag XML dibaca oleh eVis
Tag | Deskripsi |
---|---|
query | Mendefinisikan awal dan akhir dari pernyataan query. |
deskripsi singkat |
Sebuah deskripsi singkat dari query yang muncul dalam menu drop-down eVis. |
deskripsi |
Penjelasan lebih rinci dari query ditampilkan dalam jendela teks Query yang Ditentukan. |
tipebasisdata |
Tipe basisdata, yang didefinisikan dalam menu drop-down Tipe Basisdata dalam tab Sambungan Basisdata. |
portbasisdata |
Port sebagaimana didefinisikan dalam kotak teks Port di tab Sambungan Basisdata. |
namabasisdata |
Nama basisdata sebagaimana dimaksud dalam Nama Basisdata kotak teks dalam tab Sambungan Basisdata. |
uernamebaisdata |
Nama pengguna basisdata sebagai didefinisikan dalam kotak teks Nama pengguna dalam tab Sambungan Basisdata. |
katasandibasisdata |
Kata sandi basisdata seperti yang didefinisikan dalam kotak teks Kata sandi di tab Sambungan Basisdata. |
sqlstatement | Perintah SQL. |
sambungotomatis |
Sebuah bendera (“true” “atau” false ”) untuk menentukan apakah tag di atas harus digunakan secara otomatis terhubung ke basisdata tanpa menjalankan sambungan basisdata rutin dalam tab Sambungan Basisdata. |
Contoh berkas XML lengkap dengan tiga query ditampilkan di bawah ini:
<?xml version="1.0"?>
<doc>
<query>
<shortdescription>Import all photograph points</shortdescription>
<description>This command will import all of the data in the SQLite database to QGIS
</description>
<databasetype>SQLITE</databasetype>
<databasehost />
<databaseport />
<databasename>C:\textbackslash Workshop/textbackslash
eVis\_Data\textbackslash PhotoPoints.db</databasename>
<databaseusername />
<databasepassword />
<sqlstatement>SELECT Attributes.*, Points.x, Points.y FROM Attributes LEFT JOIN
Points ON Points.rec_id=Attributes.point_ID</sqlstatement>
<autoconnect>false</autoconnect>
</query>
<query>
<shortdescription>Import photograph points "looking across Valley"</shortdescription>
<description>This command will import only points that have photographs "looking across
a valley" to QGIS</description>
<databasetype>SQLITE</databasetype>
<databasehost />
<databaseport />
<databasename>C:\Workshop\eVis_Data\PhotoPoints.db</databasename>
<databaseusername />
<databasepassword />
<sqlstatement>SELECT Attributes.*, Points.x, Points.y FROM Attributes LEFT JOIN
Points ON Points.rec_id=Attributes.point_ID where COMMENTS='Looking across
valley'</sqlstatement>
<autoconnect>false</autoconnect>
</query>
<query>
<shortdescription>Import photograph points that mention "limestone"</shortdescription>
<description>This command will import only points that have photographs that mention
"limestone" to QGIS</description>
<databasetype>SQLITE</databasetype>
<databasehost />
<databaseport />
<databasename>C:\Workshop\eVis_Data\PhotoPoints.db</databasename>
<databaseusername />
<databasepassword />
<sqlstatement>SELECT Attributes.*, Points.x, Points.y FROM Attributes LEFT JOIN
Points ON Points.rec_id=Attributes.point_ID where COMMENTS like '%limestone%'
</sqlstatement>
<autoconnect>false</autoconnect>
</query>
</doc>