Earth Server Logo

BGS EarthServer - Petascope Web Coverage Processing Service (WCPS)

Enter a ProcessCoverages request in WCPS abstract syntax and submit it as a POST request with a parameter named query.

WCPS abstract syntax REQUEST

Returned data

Example queries to cut, paste, and modify

Count the number of pixels with a zero red component (faster)

for c in (bgs_rs) return
count(c.0 = 0)

Get a spatial subset of landsat data as 482x500px PNG (medium)

for v1 in (bgs_rs) return
	encode (
			trim(struct {red : (unsigned char) v1.0; green : (unsigned char) v1.1; blue : (unsigned char) v1.2},
			{E:""(437799:484326), N:""(495574:543811)}),
			{E:"CRS:1"(0:481), N:"CRS:1"(0:499)},

Get all landsat data where red component > blue component as PNG (slower)

for c in (bgs_rs) return
	(unsigned char)
	(((c.0 / (c.0 + c.2)) - (c.2 / (c.0 + c.2))) > 0.6 ) * 255,

Petascope WCPS Help

Limiting the spatial extent of queries will significantly increase speed of response.

WCPS schema