Pengklasifikasi wilayah
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Pengklasifikasi wilayah menentukan format dan lokasi untuk objek. Pengklasifikasi dapat berupa persegi panjang 2 dimensi untuk gambar, baris teks dalam dokumen, durasi waktu dalam video, dan sebagainya. Untuk menentukan region, pilih pengklasifikasi region yang cocok dengan jenis konten yang ingin Anda gunakan. Misalnya, jika konten Anda berupa teks, Anda kemungkinan akan menggunakan pengklasifikasi wilayah txt
atau line
. Untuk melihat contoh pengklasifikasi wilayah, lihat Mengelola komentar dan balasan.
Berikut adalah daftar pengklasifikasi wilayah yang disertakan dengan
Google Drive API:
rect
Persegi panjang dalam gambar 2 dimensi.
Properti |
Deskripsi |
Jenis |
x |
Posisi pada sumbu x, satuan default adalah piksel untuk gambar dan persen untuk PDF. |
Ganda |
y |
Posisi pada sumbu y, satuan default adalah piksel untuk gambar dan persen untuk PDF. |
Ganda |
w |
Panjang pada sumbu x, unit default adalah piksel untuk gambar dan persen untuk PDF. |
Ganda |
h |
Panjang pada sumbu y, unit default adalah piksel untuk gambar dan persen untuk PDF. |
Ganda |
mw |
Lebar penuh dokumen saat komentar dibuat. Gunakan ini untuk membuat x dan w tanpa unit karena dapat bertindak seperti persentase. |
Ganda |
mh |
Tinggi penuh dokumen saat komentar dibuat. Lihat mw di atas untuk mengetahui tujuannya. |
Ganda |
r |
Derajat rotasi dokumen. Misalnya, jika gambar diputar 90 derajat searah jarum jam, persegi panjang di 0,0 akan ditampilkan di kanan atas gambar. Harus salah satu dari 0, 90, 180, 270. |
Ganda |
page
Nomor halaman dalam PDF, TIFF, atau dokumen lain dengan halaman. Gunakan ini untuk dokumen dengan elemen seperti halaman (seperti spreadsheet, slide, atau lapisan).
Properti |
Deskripsi |
Jenis |
p |
Nomor halaman (berbasis indeks 0). |
Bilangan bulat |
mp |
Jumlah halaman dalam dokumen ini. |
Bilangan bulat |
time
Durasi waktu dalam video atau dokumen lain dengan dimensi waktu.
Properti |
Deskripsi |
Jenis |
t |
Waktu mulai. |
String waktu yang diformat hh:MM:ss.frac (dengan M = menit, m = milidetik; jam dan menit bersifat opsional) |
d |
Durasi rentang waktu. |
hh:MM:ss:mmm string waktu yang diformat (dengan M = menit, m = milidetik) |
md |
Durasi penuh waktu dokumen. |
hh:MM:ss:mmm string waktu yang diformat (dengan M = menit, m = milidetik) |
txt
Rentang teks dalam dokumen.
Properti |
Deskripsi |
Jenis |
o |
Offset awal (offset karakter dari awal file). |
Bilangan bulat |
l |
Panjang rentang teks. |
Bilangan bulat |
ml |
Panjang dokumen ini dalam karakter. |
Bilangan bulat |
line
Baris tertentu dalam file teks atau file apa pun yang berisi baris.
Properti |
Deskripsi |
Jenis |
n |
Nomor baris. |
Bilangan bulat |
l |
Panjang rentang baris. |
Bilangan bulat |
ml |
Jumlah maksimum baris dalam file. |
Bilangan bulat |
matrix
Lokasi dalam struktur seperti matriks. Digunakan untuk menentukan baris dan kolom dalam dokumen spreadsheet, atau dokumen lain yang memiliki struktur baris atau kolom.
Properti |
Deskripsi |
Jenis |
c |
Nomor kolom. |
Bilangan bulat |
r |
Nomor baris. |
Bilangan bulat |
w |
Jumlah kolom. |
Bilangan bulat |
h |
Jumlah baris. |
Bilangan bulat |
mw |
Lebar maksimum. |
Bilangan bulat |
mh |
Tinggi maksimum. |
Bilangan bulat |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-29 UTC.
[null,null,["Terakhir diperbarui pada 2025-08-29 UTC."],[],[],null,["# Region classifiers\n\nA region classifier specifies the format and location for an object. A\nclassifier might be a 2-dimensional rectangle for an image, a line of text in a\ndocument, a time duration in a video, and so on. To define a region, select the\nregion classifier that matches the type of content you're trying to use. For\nexample, if your content is text, you're likely going to use either the `txt`\nor `line` region classifier. To see an example of a region classifier, see\n[Manage comments and\nreplies](https://developers.google.com/workspace/drive/api/guides/manage-comments#define).\n\nThe following is a list of the region classifiers included with the\nGoogle Drive API:\n\n`rect`\n\n: A rectangle in a 2-dimensional image.\n\n | Property | Description | Type |\n |----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|\n | `x` | Position on the x axis, units default to pixels for images and percent for PDFs. | Double |\n | `y` | Position on the y axis, units default to pixels for images and percent for PDFs. | Double |\n | `w` | Length on the x axis, units default to pixels for images and percent for PDFs. | Double |\n | `h` | Length on the y axis, units default to pixels for images and percent for PDFs. | Double |\n | `mw` | The full width of the document when the comment was made. Use this to make `x` and `w` unitless since they can act like a percentage. | Double |\n | `mh` | The full height of the document when the comment was made. See `mw` above for purpose. | Double |\n | `r` | The degrees of rotation of the document. For example, if an image is rotated 90 degrees clockwise then a rectangle at 0,0 displays in the top right of the image. Should be one of 0, 90, 180, 270. | Double |\n\n`page`\n\n: A page number in a PDF, TIFF, or other document with pages. Use this for documents with page-like elements (such as a spreadsheet, slide, or layer).\n\n | Property | Description | Type |\n |----------|---------------------------------------|---------|\n | `p` | The page number (0-indexed). | Integer |\n | `mp` | The number of pages in this document. | Integer |\n\n`time`\n\n: A duration of time in a video or other document with a time dimension.\n\n | Property | Description | Type |\n |----------|-----------------------------------------|-------------------------------------------------------------------------------------------------------|\n | `t` | The start time. | `hh:MM:ss.frac` formatted time string (where M = minutes, m = millis; hours and minutes are optional) |\n | `d` | The duration of the time range. | `hh:MM:ss:mmm` formatted time string (where M = minutes, m = millis) |\n | `md` | The full-time duration of the document. | `hh:MM:ss:mmm` formatted time string (where M = minutes, m = millis) |\n\n`txt`\n\n: A range of text in a document.\n\n | Property | Description | Type |\n |----------|-------------------------------------------------------------|---------|\n | `o` | Start offset (character offset from the start of the file). | Integer |\n | `l` | The length of the text range. | Integer |\n | `ml` | The length of this document in characters. | Integer |\n\n`line`\n\n: A specific line in a text file or any files with lines in it.\n\n | Property | Description | Type |\n |----------|------------------------------------------|---------|\n | `n` | Line number. | Integer |\n | `l` | The length of the line range. | Integer |\n | `ml` | The maximum number of lines in the file. | Integer |\n\n`matrix`\n\n: A location in a matrix-like structure. Used to define rows and columns in spreadsheet documents, or any other documents that have a row or column structure.\n\n | Property | Description | Type |\n |----------|------------------------|---------|\n | `c` | The column number. | Integer |\n | `r` | The row number. | Integer |\n | `w` | The number of columns. | Integer |\n | `h` | The number of rows. | Integer |\n | `mw` | The maximum width. | Integer |\n | `mh` | The maximum height. | Integer |"]]