[gdal-dev] Help with STACIT

Laurențiu Nicola lnicola at dend.ro
Wed Dec 3 12:19:29 PST 2025


Hi Scott,

It's a little strange:

$ CPL_DEBUG=ON CURL_CPL_VERBOSE=YES gdal raster info --if STACIT "https://cmr.earthdata.nasa.gov/stac/LPCLOUD/search?collections=VIP01_004&bbox=-180,-90,180,90"

HTTP: Fetch(https://cmr.earthdata.nasa.gov/stac/LPCLOUD/search?collections=VIP01_004&bbox=-180,-90,180,90)
HTTP: libcurl/8.15.0 OpenSSL/3.5.4 zlib/1.3.1.zlib-ng libidn2/2.3.8 nghttp2/1.66.0
HTTP: These POSTFIELDS were sent:{}
ERROR 1: HTTP error code : 403

This doesn't log as much as I expected, but it sounds like it's doing a POST, given https://github.com/OSGeo/gdal/blob/master/port/cpl_http.cpp#L2565-L2571. However, if I connect to a dummy server, I see:

GET /stac/LPCLOUD/search?collections=VIP01_004&bbox=-180,-90,180,90 HTTP/1.1
Host: 127.0.0.1:7777
User-Agent: GDAL/3.11.5
Accept: */*
Accept-Encoding: gzip
Content-Type: application/json
Content-Length: 2

{}

That's a GET request with a body, which isn't really supported. You can reproduce this with cURL:

$ curl -X GET --json '{}' "https://cmr.earthdata.nasa.gov/stac/LPCLOUD/search?collections=VIP01_004&bbox=-180,-90,180,90"

[snipped CloudFront 403 error]

Laurentiu

On Wed, Dec 3, 2025, at 22:01, Scott via gdal-dev wrote:
> Greetings,
>
> I need some help with STACIT syntax. This does not work:
>
> gdal raster info 
> "STACIT:\"/vsicurl/https://cmr.earthdata.nasa.gov/stac/LPCLOUD/search?collections=VIP01_004&bbox=-180,-90,180,90\""
>
> ...it returns:
>
> ERROR 1: JSON parsing error: continue (at offset 0)
> Usage: gdal raster info [OPTIONS] <INPUT>
> Try 'gdal raster info --help' for help.
>
> If I open the link in a browser or use wget, I get the expected geojson 
> output:
>
> wget 
> 'https://cmr.earthdata.nasa.gov/stac/LPCLOUD/search?collections=VIP01_004&bbox=-180,-90,180,90' 
> -O tst.geojson
>
> Debian 12, GDAL 3.12.0
>
> Thanks!
> Scott
>
> -- 
> www.postholer.com
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list