Cloud-powered offline tasks.
This is a task definition that uses the reproject
option to reproject an SRTM
cell to Web Mercator (EPSG:3857). input
is passed directly to gdalwarp
;
you'll almost always want to use /vsicurl
to point at remote sources. In
this case, /vsizip
is also used, as the source raster is contained in a zip
file. Output is written to the URL provided in output
(only S3 buckets are
supported, and data is written with the public-read
ACL).
{
name: "reproject SRTM to 3857",
input: "/vsizip/vsicurl/http://data.stamen.com.s3.amazonaws.com/srtm/source/srtm_01_07.zip/srtm_01_07.tif",
output: "s3://data.stamen.com/srtm/3857/srtm_01_07.tiff",
operations: [
{
type: "reproject",
options: {
targetSRS: "EPSG:3857"
}
}
]
}
Generates hillshades using gdaldem
.
Reprojects GDAL-readable rasters to targetSRS
.
targetSRS
- Target SRS. Equivalent togdalwarp
's-t_srs
option. Required.
Resamples rasters in 3857 to a given targetExtent
and targetResolution
.
targetExtent
- Target Extent, an array of four values in the EPSG:3857 projection: xmin ymin xmax ymax. Equivalent togdalwarp
's-te
option. Required.targetResolution
- Target Resolution, an array of two values in EPSG:3857 units: xres yres. Equivalent togdalwarp
's-tr
option. Required.
AWS_ACCESS_KEY_ID
- Optional if instance roles are used.AWS_SECRET_ACCESS_KEY
- Optional if instance roles are used.SENTRY_DSN
- Sentry DSN for error reporting. Optional.SQS_QUEUE_NAME
- Queue name. This is also used as the prefix (with_failed
) for the dead letter queue. Required.
The AWS credentials must have sufficient access to create / modify / read
/ write SQS queues named SQS_QUEUE_NAME
and ${SQS_QUEUE_NAME}_failed
. You
should also grant access to any S3 buckets you wish to write to.
To create a VRT for S3-hosted SRTM data, do something like this:
(for f in $(< srtm.list); do echo /vsicurl/http://data.stamen.com.s3.amazonaws.com/srtm/3857/${f%%.zip}.tiff; done) | xargs gdalbuildvrt srtm.vrt
You can then refer to an S3-hosted version of that VRT:
gdalwarp -te -124.7494 45.5437 -116.9161 49.0049 \
/vsicurl/http://data.stamen.com.s3.amazonaws.com/srtm/SRTM-4326.vrt \
SRTM-washington.tiff
docker run -p 1080:1080 -v $(pwd)/conf:/etc/nginx/sites-enabled dockerfile/nginx