סיווג לפי אזור
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מסווג אזורים מציין את הפורמט והמיקום של אובייקט. מסווג יכול להיות מלבן דו-ממדי לתמונה, שורת טקסט במסמך, משך זמן בסרטון וכו'. כדי להגדיר אזור, בוחרים את מסווג האזור שמתאים לסוג התוכן שרוצים להשתמש בו. לדוגמה, אם התוכן שלכם הוא טקסט, סביר להניח שתשתמשו בסיווג אזורים txt
או line
. דוגמה לסיווג אזורי מופיעה במאמר בנושא ניהול תגובות ותשובות.
בהמשך מפורטים מסווגי האזורים שכלולים ב-Google Drive API:
rect
מלבן בתמונה דו-ממדית.
נכס |
תיאור |
סוג |
x |
המיקום בציר ה-x. יחידות ברירת המחדל הן פיקסלים לתמונות ואחוזים לקובצי PDF. |
כפול |
y |
המיקום בציר ה-Y. יחידות המידה הן פיקסלים לתמונות ואחוזים לקובצי PDF. |
כפול |
w |
האורך בציר X. יחידות ברירת המחדל הן פיקסלים לתמונות ואחוזים לקובצי PDF. |
כפול |
h |
האורך בציר Y. יחידות ברירת המחדל הן פיקסלים לתמונות ואחוזים לקובצי PDF. |
כפול |
mw |
הרוחב המלא של המסמך בזמן כתיבת התגובה. אפשר להשתמש בזה כדי להגדיר את x ו-w כערכים חסרי יחידה, כי הם יכולים לשמש כאחוזים. |
כפול |
mh |
הגובה המלא של המסמך בזמן שהתגובה נכתבה. הסבר על המטרה מופיע למעלה בכתובת mw . |
כפול |
r |
מעלות הסיבוב של המסמך. לדוגמה, אם תמונה מסובבת ב-90 מעלות בכיוון השעון, מלבן במיקום 0,0 יוצג בפינה השמאלית העליונה של התמונה. צריך להיות אחד מהערכים 0, 90, 180, 270. |
כפול |
page
מספר עמוד בקובץ PDF, TIFF או מסמך אחר עם עמודים. אפשר להשתמש באפשרות הזו במסמכים עם אלמנטים דמויי דף (כמו גיליון אלקטרוני, שקף או שכבה).
נכס |
תיאור |
סוג |
p |
מספר הדף (האינדקס מתחיל מ-0). |
מספר שלם |
mp |
מספר הדפים במסמך. |
מספר שלם |
time
משך זמן בסרטון או במסמך אחר עם מאפיין זמן.
נכס |
תיאור |
סוג |
t |
שעת ההתחלה. |
מחרוזת זמן בפורמט hh:MM:ss.frac (כאשר M = דקות, m = אלפיות השנייה; שעות ודקות הן אופציונליות) |
d |
משך הזמן של טווח הזמן. |
מחרוזת זמן בפורמט hh:MM:ss:mmm (כאשר M = דקות, m = אלפיות שנייה) |
md |
משך הזמן המלא של המסמך. |
מחרוזת זמן בפורמט hh:MM:ss:mmm (כאשר M = דקות, m = אלפיות שנייה) |
txt
טווח של טקסט במסמך.
נכס |
תיאור |
סוג |
o |
היסט התחלה (היסט של תווים מתחילת הקובץ). |
מספר שלם |
l |
אורך טווח הטקסט. |
מספר שלם |
ml |
אורך המסמך הזה בתווים. |
מספר שלם |
line
שורה ספציפית בקובץ טקסט או בכל קובץ אחר שמכיל שורות.
נכס |
תיאור |
סוג |
n |
מספר שורה. |
מספר שלם |
l |
אורך טווח השורות. |
מספר שלם |
ml |
מספר השורות המקסימלי בקובץ. |
מספר שלם |
matrix
מיקום במבנה דמוי מטריצה. התג הזה משמש להגדרת שורות ועמודות במסמכי גיליון אלקטרוני, או בכל מסמך אחר שיש בו מבנה של שורות ועמודות.
נכס |
תיאור |
סוג |
c |
מספר העמודה. |
מספר שלם |
r |
מספר השורה. |
מספר שלם |
w |
מספר העמודות. |
מספר שלם |
h |
מספר השורות. |
מספר שלם |
mw |
הרוחב המקסימלי. |
מספר שלם |
mh |
הגובה המקסימלי. |
מספר שלם |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-29 (שעון UTC).
[null,null,["עדכון אחרון: 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 |"]]