Outdated version of the documentation. Find the latest one here.

` `

Plugin Spasial Oracle GeoRaster

In Oracle databases, raster data can be stored in SDO_GEORASTER objects available with the Oracle Spatial extension. In QGIS, the oracleRaster Oracle Spatial GeoRaster plugin is supported by GDAL and depends on Oracle’s database product being installed and working on your machine. While Oracle is proprietary software, they provide their software free for development and testing purposes. Here is one simple example of how to load raster images to GeoRaster:

$ gdal_translate -of georaster input_file.tif geor:scott/tiger@orcl

Hal ini akan memuat raster ke default tabel GDAL_IMPORT, sebagai kolom bernama RASTER.

Mengelola koneksi-koneksi

Firstly, the Oracle GeoRaster Plugin must be enabled using the Plugin Manager (see The Plugins Dialog). The first time you load a GeoRaster in QGIS, you must create a connection to the Oracle database that contains the data. To do this, begin by clicking on the oracleRaster Add Oracle GeoRaster Layer toolbar button – this will open the Select Oracle Spatial GeoRaster dialog window. Click on [New] to open the dialog window, and specify the connection parameters (See Figure_oracle_raster_connection):

  • Nama: Masukkan nama dari sambungan basisdata.

  • Contoh basisdata: Masukkan nama dari basisdata yang ingin Anda sambungkan.

  • Namapengguna: Tentukan nama pengguna/username Anda sendiri yang akan Anda gunakan untuk mengakses basisdata.

  • Kata sandi: Memasukkan kata sandi/password yang terkait dengan nama pengguna yang diperlukan untuk mengakses basisdata.

../../../_images/oracle_create_dialog.png

Buat dialog koneksi Oracle

Now, back on the main Oracle Spatial GeoRaster dialog window (see Figure_oracle_raster_selection), use the drop-down list to choose one connection, and use the [Connect] button to establish a connection. You may also [Edit] the connection by opening the previous dialog and making changes to the connection information, or use the [Delete] button to remove the connection from the drop-down list.

Memilih sebuah GeoRaster

Setelah sambungan telah ditetapkan, jendela subdatasets akan menampilkan nama-nama semua tabel yang berisi kolom GeoRaster dalam basisdata dalam format nama GDAL subdataset.

Klik pada salah satu subdatasets terdaftar dan kemudian klik pada [Pilih] memilih nama tabel. Sekarang daftar subdatasets lain akan menunjukkan nama-nama kolom GeoRaster di tabel itu. Biasanya sebuah daftar singkat, karena sebagian besar pengguna tidak akan memiliki lebih dari satu atau dua kolom GeoRaster di tabel yang sama.

Klik pada salah satu subdatasets terdaftar dan kemudian klik pada [Pilih] memilih salah satu kombinasi tabel/kolom. Dialog sekarang akan menampilkan semua baris yang berisi obyek-obyek GeoRaster. Perhatikan bahwa daftar subdataset sekarang akan menampilkan Tabel Data Raster dan pasangan Id Raster.

Setiap saat, masukan seleksi dapat diedit untuk bisa langsung ke GeoRaster yang diketahui atau kembali ke awal dan pilih nama tabel lain.

../../../_images/oracle_select_dialog.png

Pilih dialog Oracle GeoRaster

Masukan data seleksi juga dapat digunakan untuk memasukkan WHERE klausul pada akhir identifikasi string (misal, geor:scott/tiger@orcl,gdal_import,raster,geoid=). Lihat http://www.gdal.org/frmt_georaster.html untuk informasi lebih lanjut.

Menampilkan GeoRaster

Finally, by selecting a GeoRaster from the list of Raster Data Tables and Raster Ids, the raster image will be loaded into QGIS.

Dialog Pilih Spasial Oracle GeoRaster dapat ditutup sekarang dan waktu berikutnya terbuka, akan menjaga sambungan yang sama dan akan menampilkan daftar sama subdatasets sebelumnya, sehingga sangat mudah untuk membuka gambar lain dari konteks yang sama.

Catatan

GeoRasters that contain pyramids will display much faster, but the pyramids need to be generated outside of QGIS using Oracle PL/SQL or gdaladdo.

Berikut ini adalah contoh menggunakan gdaladdo:

$ gdaladdo georaster:scott/tiger@orcl,georaster\_table,georaster,georid=6 -r
nearest 2 4 6 8 16 32

Ini contoh menggunakan PL/SQL:

$ sqlplus scott/tiger
SQL> DECLARE
 gr sdo_georaster;
BEGIN
    SELECT image INTO gr FROM cities WHERE id = 1 FOR UPDATE;
    sdo_geor.generatePyramid(gr, 'rLevel=5, resampling=NN');
    UPDATE cities SET image = gr WHERE id = 1;
    COMMIT;
END;