Method: projects.image.import

Imports an image.

HTTP request

POST https://earthengine.googleapis.com/v1alpha/{project=projects/*}/image:import

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

The project id or project number of the Google Cloud Platform project that should be treated as the service consumer for this request. Format is projects/{project-id}.

Authorization requires the following Google IAM permission on the specified resource project:

  • earthengine.imports.create

Request body

The request body contains data with the following structure:

JSON representation
{
  "imageManifest": {
    object (ImageManifest)
  },
  "description": string,
  "overwrite": boolean,
  "requestId": string
}
Fields
imageManifest

object (ImageManifest)

The image manifest.

description

string

An optional human-readable name of the task.

overwrite

boolean

An optional flag to allow overwriting an existing asset.

requestId

string

A unique string used to detect duplicated requests. If more than one request is made by the same user with the same non-empty requestId, only one of those requests may successfully start a long-running operation. requestId may contain the characters a..z, A..Z, 0-9, or '-'. requestId may be at most 60 characters long.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/earthengine
  • https://www.googleapis.com/auth/cloud-platform

ImageManifest

Describes how the EarthEngine service should compose an image from a set of files.

JSON representation
{
  "name": string,
  "properties": {
    object
  },
  "uriPrefix": string,
  "tilesets": [
    {
      object (Tileset)
    }
  ],
  "bands": [
    {
      object (TilesetBand)
    }
  ],
  "maskBands": [
    {
      object (TilesetMaskBand)
    }
  ],
  "footprint": {
    object (PixelFootprint)
  },
  "missingData": {
    object (MissingData)
  },
  "pyramidingPolicy": enum (PyramidingPolicy),
  "startTime": string,
  "endTime": string
}
Fields
name

string

The name of the asset to be created. name is of the format "projects/*/assets/**" (e.g. "projects/earthengine-legacy/assets/users//"). All user-owned assets are under the project "earthengine-legacy" (e.g. "projects/earthengine-legacy/assets/users/foo/bar"). All other assets are under the project "earthengine-public" (e.g. "projects/earthengine-public/assets/LANDSAT").

properties

object (Struct format)

Additional properties of the asset. The property names "system:time_start" and "system:time_end" are deprecated. Use the fields startTime and endTime instead.

uriPrefix

string

The optional prefix prepended to all uris defined in this manifest.

tilesets[]

object (Tileset)

The tilesets. Each tileset must have a unique ID.

bands[]

object (TilesetBand)

The bands. The band order of the asset is the same as the order of bands.

maskBands[]

object (TilesetMaskBand)

The mask bands.

footprint

object (PixelFootprint)

The footprint in pixel coordinates (not in lat/lng coordinates). If empty, the footprint is by default the entire image. See PixelGrid for a more detailed description of pixel coordinates.

missingData

object (MissingData)

The values which represent no data in all bands of the image. Applies to all bands which do not specify their own missingData.

pyramidingPolicy

enum (PyramidingPolicy)

The pyramiding policy. If unspecified, the policy MEAN is applied by default. Applies to all bands which do not specify their own pyramidingPolicy.

startTime

string (Timestamp format)

The timestamp associated with the asset, if any, e.g. the time at which a satellite image was taken. For assets that correspond to an interval of time, such as average values over a month or year, this timestamp corresponds to the start of that interval.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

For assets that correspond to an interval of time, such as average values over a month or year, this timestamp corresponds to the end of that interval (exclusive).

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

Tileset

A set of ImageSources that can be referenced with a unique ID.

JSON representation
{
  "id": string,
  "sources": [
    {
      object (ImageSource)
    }
  ],
  "dataType": enum (DataType),
  "crs": string
}
Fields
id

string

The ID of the tileset. Must be unique among tilesets specified in the ImageManifest. This ID is discarded during the processing step; it is only used to link a Tileset to a band. The empty string is a valid ID.

sources[]

object (ImageSource)

The sources which comprise this tileset.

dataType

enum (DataType)

An optional data type for the band. If specified, no check is done to verify that the type of every input file matches. dataType must match the type of every input file, except for cases where the input type is ambiguous (e.g. Byte can be INT8 or UINT8).

crs

string

The coordinate reference system of the pixel grid, specified as a standard code where possible, and in WKT format otherwise.

ImageSource

An image file and its sidecars.

JSON representation
{
  "uris": [
    string
  ],
  "affineTransform": {
    object (AffineTransform)
  }
}
Fields
uris[]

string

The URIs of the data to import. Currently, only Google Cloud Storage URIs are supported. Each URI must be specified in the following format: "gs://bucket-id/object-id". The primary object should be the first element of the list, and sidecars listed afterwards. Each URI is prefixed with ImageManifest.uri_prefix if set.

affineTransform

object (AffineTransform)

An optional affine transform. Should only be specified if the data from uris (including any sidecars) isn't sufficient to place the pixels.

DataType

Specifies the numeric data type.

Enums
DATA_TYPE_UNSPECIFIED Unspecified.
INT8 8-bit signed integer.
UINT8 8-bit unsigned integer.
INT16 16-bit signed integer.
UINT16 16-bit unsigned integer.
INT32 32-bit signed integer.
UINT32 32-bit unsigned integer.
FLOAT 32-bit float.
DOUBLE 64-bit float.

TilesetBand

Represents a single band sourced from a tileset.

JSON representation
{
  "id": string,
  "tilesetId": string,
  "tilesetBandIndex": number,
  "missingData": {
    object (MissingData)
  },
  "pyramidingPolicy": enum (PyramidingPolicy)
}
Fields
id

string

The ID of the band.

tilesetId

string

The ID of the tileset corresponding to the band.

tilesetBandIndex

number

The zero-based band index from the tileset corresponding to the band.

missingData

object (MissingData)

The values which represent no data in the band.

pyramidingPolicy

enum (PyramidingPolicy)

The pyramiding policy.

TilesetMaskBand

Represents a single mask band sourced from a tileset.

JSON representation
{
  "tilesetId": string,
  "bandIds": [
    string
  ]
}
Fields
tilesetId

string

The ID of the Tileset corresponding to the mask band. The last band of the Tileset is always used as the mask band.

bandIds[]

string

The IDs of bands that the mask band applies to. If empty, the mask band is applied to all bands in the asset. Each band may only have one corresponding mask band.

PixelFootprint

A footprint of all valid pixels in an image.

JSON representation
{
  "points": [
    {
      object (GridPoint)
    }
  ],
  "bandId": string
}
Fields
points[]

object (GridPoint)

A ring which forms the exterior of a simple polygon that must contain the centers of all valid pixels of the image. This must be a linear ring: the last point must be equal to the first. Coordinates are in the projection of the band specified by bandId.

Note: Use non-integer coordinates such as the center of each pixel because footprint is taken to include a pixel iff the pixel (a 1x1 rectangle) intersects the footprint. To avoid accidentally selecting neighboring pixels, don't use integer-valued coordinates, because those are the boundaries between pixels. Drawing the footprint along the pixel centers prevents including unintended pixels, which can cause errors when intended pixels are abutting a map boundary such as the antimeridian or a pole.

For example, for a 2x2 image with all 4 valid pixels the following is one possible ring: [{"x": 0.5, "y": 0.5}, {"x": 0.5, "y": 1.5}, {"x": 1.5, "y": 1.5}, {"x": 1.5, "y": 0.5}, {"x": 0.5, "y": 0.5}]

bandId

string

The ID of the band whose CRS defines the coordinates of the footprint. If empty, the first band is used.

GridPoint

A two-dimensional point or vector.

JSON representation
{
  "x": number,
  "y": number
}
Fields
x

number

The x coordinate value.

y

number

The y coordinate value.