icepyx.Query.spatial_extent

property Query.spatial_extent

Return an array showing the spatial extent of the query object. Spatial extent is returned as an input type (which depends on how you initially entered your spatial data) followed by the geometry data. Bounding box data is [lower-left-longitude, lower-left-latitute,

… upper-right-longitude, upper-right-latitude].

Polygon data is [longitude1, latitude1, longitude2, latitude2,

… longitude_n,latitude_n, longitude1,latitude1].

Returns:
tuple of length 2
First tuple element is the spatial type (“bounding box” or “polygon”).
Second tuple element is the spatial extent as a list of coordinates.

See also

Spatial.extent
Spatial.extent_type
Spatial.extent_as_gdf

Examples

# Note: coordinates returned as float, not int >>> reg_a = GenQuery([-55, 68, -48, 71],[‘2019-02-20’,’2019-02-28’]) >>> reg_a.spatial_extent (‘bounding_box’, [-55.0, 68.0, -48.0, 71.0])

>>> reg_a = GenQuery([(-55, 68), (-55, 71), (-48, 71), (-48, 68), (-55, 68)],['2019-02-20','2019-02-28'])
>>> reg_a.spatial_extent
('polygon', [-55.0, 68.0, -55.0, 71.0, -48.0, 71.0, -48.0, 68.0, -55.0, 68.0])

# NOTE Is this where we wanted to put the file-based test/example? # The test file path is: examples/supporting_files/simple_test_poly.gpkg