doerr@usgs.gov

is layerdefs parameter only for WMS MapServer services?

Discussion created by doerr@usgs.gov on Jun 26, 2014
Latest reply on Jun 27, 2014 by wju-esristaff
So according to this document (http://resources.arcgis.com/en/help/main/10.2/index.html#/Filtering_features_using_the_layerDefs_parameter_in_WMS_requests/015400000604000000/) there's a layerDefs parameter that can be appended to a WMS getMap that will filter your results.
Apparently this parameter only applies to MapServer services, though.  Because when I try it on my ImageServer service I get an error.
My url is:
http://igskmncngs137.cr.usgs.gov/arcgis/services/Greenness/USGS_Greenness/ImageServer/WMSServer?request=getmap&service=WMS&version=1.3.0&styles=&crs=crs:84&format=image/png&bgcolor=0xFFFFFF&transparent=true&layers=USGS_Greenness&bbox=-96.0922942546,25.9674163260731,-76.7324944072095,45.2375171362684&width=600&height=600&layerDefs={"USGS_Greenness":"Name='GREENNESS.GREENNESS_DAV_1'"}

My response is:
<ServiceExceptionReport version="1.1.1"><ServiceException code="InvalidFormat">
Can't parse XML request.
  </ServiceException></ServiceExceptionReport>

Can anybody confirm layerDefs doesn't work with ImageServer services?  Or if it is supposed to work, what does a valid request look like?

I've also tried defining and using an OGC dimension called "name".  Then my wms call looks like this:
"http://igskmncngs137.cr.usgs.gov/arcgis/services/Greenness/USGS_Greenness/ImageServer/WMSServer?request=getmap&service=WMS&version=1.3.0&styles=&crs=crs:84&format=image/png&bgcolor=0xFFFFFF&transparent=true&layers=USGS_Greenness&bbox=-96.0922942546,25.9674163260731,-76.7324944072095,45.2375171362684&width=600&height=600&dim_name=GREENNESS.GREENNESS_DAV_1"

But no matter what value I put in for dim_name I always get back the same image.

Any help you can provide on either parameter will be greatly appreciated.


Thank you.

Outcomes