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 (
		scale(
			trim(struct {red : (unsigned char) v1.0; green : (unsigned char) v1.1; blue : (unsigned char) v1.2},
			{E:"http://www.opengis.net/def/crs/EPSG/0/27700"(437799:484326), N:"http://www.opengis.net/def/crs/EPSG/0/27700"(495574:543811)}),
			{E:"CRS:1"(0:481), N:"CRS:1"(0:499)},
			{}
			),
		"png"
		)

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

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



Petascope WCPS Help

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

WCPS schema http://schemas.opengis.net/wcps/1.0/