Filtering raster dataset in webapp

1356
2
Jump to solution
06-26-2013 02:56 AM
DainiusTamosiunas
New Contributor III
I have around 1000 rasters (b&w tiffs) and most of them overlay each other. At this moment, I'm holding them in mosaic dataset and I want them to be displayed in my javascript webapp. I am able to load it as Dynamic or Image service layer and it loads all the rasters at once. In screenshot below, mosaic's attribute table has field "Name" in which names of all the rasters are held (all names are unique to only one raster). In my webapp, I want to dynamically show only one raster by specifying its name.

Part of mosaic: http://i.imgur.com/RB2zl52.jpg

In arcmap I can use layer's definition query to select only particular raster (screenshot below).

Filtered by definition query: http://i.imgur.com/XDkFl8y.jpg

What would be the appropriate approach to have dataset filtered in webapp?
0 Kudos
1 Solution

Accepted Solutions
DainiusTamosiunas
New Contributor III
I've found the answer: http://gis.stackexchange.com/questions/64477/arcgis-javascript-api-filter-raster-dataset

var mr = new esri.layers.MosaicRule(); mr.method = esri.layers.MosaicRule.METHOD_CENTER; mr.ascending = true; mr.operation = esri.layers.MosaicRule.OPERATION_FIRST; mr.where = "NAME = '" + rasterName + "'";  ArcGISImageServiceLayer.setMosaicRule(mr) 

View solution in original post

0 Kudos
2 Replies
DainiusTamosiunas
New Contributor III
I've found the answer: http://gis.stackexchange.com/questions/64477/arcgis-javascript-api-filter-raster-dataset

var mr = new esri.layers.MosaicRule(); mr.method = esri.layers.MosaicRule.METHOD_CENTER; mr.ascending = true; mr.operation = esri.layers.MosaicRule.OPERATION_FIRST; mr.where = "NAME = '" + rasterName + "'";  ArcGISImageServiceLayer.setMosaicRule(mr) 
0 Kudos
YangLiu2
New Contributor II
Hi,

I have the same question. We have more than 200 raster datasets. Right now, I add them into one mosaic dataset and publish the mosaic dataset as image service. My clients want to access to mosaic attribute table and to query and filter based on the mosaic attibute table so that only the raster dataset they want can be shown. Do you have any suggestion or new found? Thanks!

-YL
0 Kudos