Result Types

When calling compute, results are packaged into these types (or returned as builtin Python types when appropriate, such as for Dict, Int, or Datetime).

Note that these are just simple containers, and aren’t interoparable with their corresponding Proxytypes. For instance, you can’t do wf.Image.from_id("foo") + my_image_result, where my_image_result is an ImageResult instance.

Classes

ImageResult(ndarray, properties, bandinfo, …)

Result of calling compute on an Image.

ImageCollectionResult(ndarray, properties, …)

Result of calling compute on an ImageCollection.

GeometryResult(type, coordinates[, crs])

Result of calling compute on a Geometry.

GeometryCollectionResult(type, geometries[, crs])

Result of calling compute on a GeometryCollection.

FeatureResult(geometry, properties)

Result of calling compute on a Feature.

FeatureCollectionResult(features)

Result of calling compute on a FeatureCollection.

class ImageResult(ndarray, properties, bandinfo, geocontext)[source]

Result of calling compute on an Image.

ndarray

3-dimensional array of image data, in order (band, y, x)

Type

numpy.ndarray

properties

dict of metadata about the Image.

Type

dict[str, any]

bandinfo

OrderedDict of metadata about each band. The order corresponds to the bands in the ndarray.

Type

OrderedDict[str, dict[str, any]]

geocontext

GeoContext over which computation was done.

Type

dict

class ImageCollectionResult(ndarray, properties, bandinfo, geocontext)[source]

Result of calling compute on an ImageCollection.

ndarray

4-dimensional array of image data, in order (image, band, y, x)

Type

numpy.ndarray

properties

List of metadata dicts about each Image in the ImageCollection. The order corresponds to axis 0 of the ndarray.

Type

list[dict[str, any]]

bandinfo

OrderedDict of metadata about each band. The order corresponds to the bands (axis 1) in the ndarray.

Type

OrderedDict[str, dict[str, any]]

geocontext

GeoContext over which computation was done.

Type

dict

class GeometryResult(type, coordinates, crs=None)[source]

Result of calling compute on a Geometry.

type

The type of geometry. One of “Point”, “MultiPoint”, “LineString”, “MultiLineString”, “Polygon”, “MultiPolygon”, or “LinearRing”.

Type

str

coordinates

Coordinates for the geometry, in WGS84 lat-lon (EPSG:4326). May be a list of floats, a list of lists of floats, or a list of lists of lists of floats depending on the type.

Type

list

__geo_interface__

GeoJSON representation of the Geometry, following the Python __geo_interface__ convention.

Type

dict

shapely

The GeometryResult as a shapely shape. Raises ImportError if the shapely package is not installed.

Type

shapely.geometry.BaseGeometry

class GeometryCollectionResult(type, geometries, crs=None)[source]

Result of calling compute on a GeometryCollection.

type

The type of geometry. Always “GeometryCollection”.

Type

str

geometries

List of GeometryResult objects in the collection.

Type

list[GeometryResult]

__geo_interface__

GeoJSON representation of the GeometryCollection, following the Python __geo_interface__ convention.

Type

dict

shapely

The GeometryCollection as a shapely shape. Raises ImportError if the shapely package is not installed.

Type

shapely.geometry.GeometryCollection

class FeatureResult(geometry, properties)[source]

Result of calling compute on a Feature.

geometry

The GeometryResult of the feature.

Type

GeometryResult

properties

Properties associated with the FeatureResult.

Type

dict

__geo_interface__

GeoJSON representation of the FeatureResult, following the Python _geo_interface__ convention.

Type

dict

shapely

The geometry of the FeatureResult as a shapely shape. Raises ImportError if the shapely package is not installed.

Type

shapely.geometry.BaseGeometry

class FeatureCollectionResult(features)[source]

Result of calling compute on a FeatureCollection.

features

List of FeatureResult result objects in the collection.

Type

list[FeatureResult]

__geo_interface__

GeoJSON representation of the FeatureCollectionResult, following the Python __geo_interface__ convention.

Type

dict