URL Formation
Structure
Pass a Transform GeoTIFF complete with parameters, prepended with /vsicurl/
, to GDAL CLI. Example URL:
https://api.maxar.com/analytics/v1/raster/ortho/geotiff?function=pansharp_ortho&p=collect_identifier="10300100E538FE00"&p=crs="EPSG:4326"&p=bands="red,green,blue"&p=dra=true&p=acomp=true&p=hd=true&maxar_api_key=<YOUR_API_KEY>
Try the URL Formulator tool.
The URL can be broken into a few components:
Host Name | Script | Format | function | Parameters |
---|---|---|---|---|
https://api.maxar.com/v1/raster/ | SCRIPT_ID | geotiff | function=FUNCTION_NAME | p=PARAMETER_NAME=PARAMETER_VALUE |
Insert your script ID | geotiff | Script function name as URL parameter | Function parameters entered as URL parameters. Repeat the p=name=value for each parameter. | |
https://api.maxar.com/v1/raster/ | ortho | geotiff | function=pansharp_ortho | p=collect_identifier="10300100E538FE00"&p=crs="EPSG:4326"&p=bands="red,green,blue"&p=dra=true&p=acomp=true&p=hd=true |
For GDAL use:
/vsicurl/
is prepended to the URL. See network based virtual file systems in the GDAL documentation.- URL Query parameter should be url encoded...
- only the
value
member ofname=value
pairs need be encoded so that any special chars such as"
be replaced with its percent encoded equivalent. p=collect_identifier="10300100E538FE00"
becomesp=collect_identifier=%2210300100E538FE00%22
- only the
https://api.maxar.com/analytics/v1/raster/ortho/geotiff?function=pansharp_ortho&p=collect_identifier="10300100E538FE00"&p=crs="EPSG:4326"&p=bands="red,green,blue"&p=dra=true&p=acomp=true&p=hd=true&maxar_api_key=<YOUR_API_KEY>
becomes
https://api.maxar.com/analytics/v1/raster/ortho/geotiff?function=pansharp_ortho&p=collect_identifier=%2210300100E538FE00%22&p=crs=%22EPSG:4326%22&p=bands=%22red,green,blue%22&p=dra=true&p=acomp=true&p=hd=true&maxar_api_key=<YOUR_API_KEY>
and correctly prefixed for the GDAL becomes
gdalinfo "/vsicurl/https://api.maxar.com/analytics/v1/raster/ortho/geotiff?function=pansharp_ortho&p=collect_identifier=%2210300100E538FE00%22&p=crs=%22EPSG:4326%22&p=bands=%22red,green,blue%22&p=dra=true&p=acomp=true&p=hd=true&maxar_api_key=<YOUR_API_KEY>"
Google maps developer docs has a good page describing URL Encoding
See the QGIS pages for more information on using as a remote raster layer in QGIS.