[gdal-dev] Issue with the STACIT usage examples
Rahkonen Jukka
jukka.rahkonen at maanmittauslaitos.fi
Thu Nov 21 07:41:22 PST 2024
Hi,
I do not still quite understand. I think that usually "&" is accepted without escaping. There are examples on the WMS page which work with copy-paste on windows, like
gdalinfo "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true"
and
gdallocationinfo "WMS:http://demo.opengeo.org/geoserver/gwc/service/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=og%3Abugsites&SRS=EPSG:900913&BBOX=-1.15841845090625E7,5479006.186718751,-1.1505912992109375E7,5557277.703671876&FORMAT=image/png&TILESIZE=256&OVERVIEWCOUNT=25&MINRESOLUTION=0.0046653459640220&TILED=true"
Is there something special in the STACIT driver that makes it trickier to use than WMS driver? Does it need to be so?
-Jukka Rahkonen-
Lähettäjä: Rahkonen Jukka
Lähetetty: torstai 21. marraskuuta 2024 15.34
Vastaanottaja: Daniel Evans <daniel.fred.evans at gmail.com>
Kopio: 'gdal-dev at lists.osgeo.org' (gdal-dev at lists.osgeo.org) <gdal-dev at lists.osgeo.org>
Aihe: Re: [gdal-dev] Issue with the STACIT usage examples
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.evans at gmail.com<mailto:daniel.fred.evans at gmail.com>>
Lähetetty: torstai 21. marraskuuta 2024 15.23
Vastaanottaja: Rahkonen Jukka <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>>
Kopio: 'gdal-dev at lists.osgeo.org' (gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>) <gdal-dev at lists.osgeo.org<mailto:gdal-dev at 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 at lists.osgeo.org<mailto:gdal-dev at 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 at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241121/ee2dc33f/attachment.htm>
More information about the gdal-dev
mailing list