Constructing an item from a shapely derived mapping results in validation errors when calling item.validate()
Example:
import shapely
from pystac import Item
import datetime
geom = shapely.from_wkt("POLYGON ((-95.780872 29.517294, -95.783782 29.623358, -96.041791 29.617689, -96.038613 29.511649, -95.780872 29.517294))")
bbox = geom.bounds
geojson = shapely.geometry.mapping(geom)
item = Item(
id="some_id",
geometry=geojson,
bbox=bbox,
datetime=datetime.datetime.now(),
properties={},
)
item.validate()
yields an error as coords are expected to validate as lists:
pystac.errors.STACValidationError: {'type': 'Polygon', 'coordinates': (((-95.780872, 29.517294), (-95.783782, 29.623358), (-96.041791, 29.617689), (-96.038613, 29.511649), (-95.780872, 29.517294)),)} is not valid under any of the given schemas...
Surfaced from testing migration to v2 using stactools as test case
Constructing an item from a shapely derived mapping results in validation errors when calling item.validate()
Example:
yields an error as coords are expected to validate as lists:
Surfaced from testing migration to v2 using stactools as test case