GetThumbnailPixels와 함께 사용됩니다. thumbnails.create 호출은 표현식과 일부 출력 옵션을 제공합니다. thumbnails.create의 결과는 해당 표현식을 평가하고 이러한 옵션을 적용한 결과인 이미지를 나타내는 ID입니다. 그런 다음 GetThumbnailPixels를 호출하여 결과 이미지 전체의 이미지 데이터를 가져올 수 있습니다. ID는 몇 시간 동안 유효합니다.
이 엔드포인트 쌍의 가장 일반적인 사용 사례는 thumbnails.create에 대한 POST를 통해 복잡한 표현식을 제공한 다음 GetThumbnailPixels에 대한 GET을 통해 계산된 이미지를 가져오는 것입니다. 이 두 부분으로 구성된 프로세스를 사용하면 ComputePixels보다 더 많은 상황에서 사용할 수 있습니다. 특히: - 인코딩된 이미지 바이트를 가져오려면 ComputePixels의 결과를 래핑 해제해야 합니다. GetThumbnailPixels의 결과는 브라우저에서 직접 표시할 수 있습니다. - ComputePixels는 적절한 범위의 OAuth 토큰을 사용하여 승인된 사용자만 호출할 수 있습니다. thumbnails.create에도 동일한 제한사항이 적용되지만 GetThumbnailPixels는 API 키가 포함된 URL로 호출할 수 있으므로 이를 호출하는 URL을 더 광범위하게 사용할 수 있습니다.
표현식 평가 결과는 요청된 이미지 형식에 대한 몇 가지 합리적인 요구사항을 충족해야 합니다. 특히 JPEG 또는 PNG 형식의 경우 출력 밴드가 1개 또는 3개여야 하며 0~255 범위를 벗어나는 클립 값이 있어야 합니다.
'썸네일'이라는 설명은 계산된 이미지의 크기에 대한 제한을 의미하지 않습니다. ComputePixels와 동일한 제한사항이 thumbnails.create/GetThumbnailPixels에도 적용됩니다. 요청은 요청당 비압축 데이터 48MB로 제한되며, 이는 요청 크기(픽셀), 요청된 이미지 밴드 수, 각 밴드의 픽셀당 바이트 수를 곱하여 계산됩니다. 요청은 둘 중 하나의 크기가 최대 32,000픽셀, 최대 1,024개 밴드로 제한됩니다. 이 한도를 초과하는 요청은 400 (BAD_REQUEST) 오류 코드를 발생시킵니다.
HTTP 요청
POST https://earthengine.googleapis.com/v1/{parent=projects/*/locations/*}/thumbnails
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-03-06(UTC)"],[[["`thumbnails.create` generates an ID for an image created from a provided expression and options, usable with `GetThumbnailPixels` to retrieve the image data."],["This two-step process allows broader usage than `ComputePixels`, as `GetThumbnailPixels` can be invoked with an API key and its result displayed directly in a browser."],["While called \"thumbnail\", there's no strict size limitation, but restrictions similar to `ComputePixels` apply, with errors for exceeding data, dimension, or band limits."],["The generated thumbnail ID is valid for a few hours and the image format must meet requirements, such as specific band numbers for JPEG or PNG."],["Authentication is required for `thumbnails.create`, with various OAuth scopes or IAM permissions accepted."]]],["`thumbnails.create` generates an ID representing an image derived from an expression and output options. This ID, valid for a few hours, is then used with `GetThumbnailPixels` to retrieve the image data. `GetThumbnailPixels` can be invoked via a URL with an API key. Output image formats (JPEG/PNG) need one or three bands and values in the 0-255 range. Image size is limited to 48MB uncompressed, with at most 32K pixels per dimension and 1024 bands. Authorization for creating thumbnails requires IAM permissions.\n"]]