[gdal-dev] Open a string (json) as STACIT in python

Smith, Michael ERDC-RDE-CRREL-NH CIV Michael.Smith at erdc.dren.mil
Mon Mar 11 11:30:17 PDT 2024


I’m building a stac item collection programmatically and I want to open that item collection in gdal using the python bindings. It all works if I save to a file or from a url (and I prefix with “STACIT:”) but I cannot seem to be able to open a variable containing json as STACIT. I have tried with

myds = gdal.OpenEx(stac_string, allowed_drivers=["STACIT"])
or
myds = gdal.OpenEx("STACIT: "+stac_string)

I can open the json as myds = gdal.OpenEx(stac_string) but then its treated as geojson and I cannot figure out how to convert/treat it as STACIT.

Mike


-- 
Michael Smith 
US Army Corps of Engineers 
Remote Sensing/GIS Center 







More information about the gdal-dev mailing list