Sunday, 8 February 2015

wms - Clipping a Geoserver raster layer with a polygon


I have an image mosaic raster layer with an extent that covers the contiguous United States. I also have a wfs layer with various polygons some covering subsets of the US and some outside of the US.


Essentially I'd like to have a request that returns a clipped version of the raster using one of these polygon.


As an attempt to do this I've installed the cross layer filtering extension


The following query either returns the entire raster or none of it based on if any part of the entire geometry of the raster intersects the polygon.


http://geoserverinstance/geoserver/wms?&layers=gdd:agdd&styles=gdd:agdd_web,&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4269&CQL_FILTER=INTERSECTS(the_geom, querySingle('gdd:redmaple', 'geom', 'gid=1'))&bbox=-125.020833333333,24.0625,-66.479166666662,49.937500000002&width=1600&height=800

In the query I just pass "the_geom" for the raster layer. Is there a way for it to do the intersection on a pixel by pixel basis masking out the pixels that don't intersect?



Is it not possible to do this clipping activity using this extension? I know there is also a wps extension that might do it, but I've had issues installing it. So if this won't work I can go back to trying to figure those issues out.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...