Thanks Daniel,

Works with backslash escapes for internal " (this is for GDAL I suppose) and 
carets for & (this is for Windows).

gdalinfo  "STACIT:\ 
"https://planetarycomputer.microsoft.com/api/stac/v1/search?collections=naip^&bbox=-100,40,-99,41^&datetime=2019-01-01T00:00:00Z%2F..\<https://planetarycomputer.microsoft.com/api/stac/v1/search?collections=naip%5e&bbox=-100,40,-99,41%5e&datetime=2019-01-01T00:00:00Z%2F..%5C>
 ":asset=image"

-Jukka-

Lähettäjä: Daniel Evans <daniel.fred.ev...@gmail.com>
Lähetetty: torstai 21. marraskuuta 2024 15.23
Vastaanottaja: Rahkonen Jukka <jukka.rahko...@maanmittauslaitos.fi>
Kopio: 'gdal-dev@lists.osgeo.org' (gdal-dev@lists.osgeo.org) 
<gdal-dev@lists.osgeo.org>
Aihe: Re: [gdal-dev] Issue with the STACIT usage examples

Hi Jukka,

Those are errors from your the Windows command prompt. You will need to escape 
or enclose some special characters like the ampersands.

On Thu, 21 Nov 2024, 14:15 Rahkonen Jukka via gdal-dev, 
<gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>> wrote:
Hi,

The examples in https://gdal.org/en/latest/drivers/raster/stacit.html with 
&bbox in the search parameters may not work as they have used to work.
For example:
gdalinfo "STACIT:\ 
"https://planetarycomputer.microsoft.com/api/stac/v1/search?collections=naip&bbox=-100,40,-99,41&datetime=2019-01-01T00:00:00Z%2F..\<https://planetarycomputer.microsoft.com/api/stac/v1/search?collections=naip&bbox=-100,40,-99,41&datetime=2019-01-01T00:00:00Z%2F..%5C>
 ":asset=image"
The subdatasets names get printed but at the end of output I see
'bbox' is not recognized as an internal or external command,
operable program or batch file.
'datetime' is not recognized as an internal or external command,
operable program or batch file.

Does it mean that bbox and datetime filters are not applied? A warning "Warning 
1: Maximum number of items (1000) allowed to be retrieved has been hit" makes 
me think so because the search from the API returns 249 items.
I am on Windows.

-Jukka Rahkonen-
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to