sdk.aoi.upload()

elements.sdk.api.aoi

Upload an AOI from a file.

Create a new AOI from a local file, in any of these supported file formats: .zip (shapefile), geojson, kml, kmz, or wkt.

📘

GeoJson Encoding

JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32. The default encoding is UTF-8, and JSON texts that are encoded in UTF-8 are interoperable in the sense that they will be read successfully by the maximum number of implementations.

Parameters

  • aoi_collection_id (str) : the AOI Collection ID to which you are adding the AOI
  • file_path (str) : the path to the file you are uploading

Returns

AOITransaction

Example(s)

# Upload an AOI to a Collection
await sdk.aoi.upload(aoi_collection_id="43af4120-959c-47be-a34c-9c7bf5ab37af",
                     file_path="./my_aois/starbucks.geojson")

# Output (AOITransaction)
id: "3081481b-5dbd-4297-9a82-3d43eb49706c"
status: "QUEUED"
created_on {
  seconds: 1666754753
  nanos: 279047000
}
updated_on {
  seconds: 1666754753
  nanos: 279047000
}