tanyg

how to pass the parameter in silverlight about call GeoProcessing?

Discussion created by tanyg on Nov 11, 2010
Latest reply on Nov 15, 2010 by tanyg
hi all
i build a GeoProcessing server in ModelBuilder:
i use the IDW in Raster Interpolation to convert some point to raster,and then publish it  to ArcGIS Server, in ArcGIS Desktop and Web Application ,call the GP it is ok, but in Silverlight C# , ERROR!

the rest info is :

Task: Model
Display Name: Model

Category:
Help URL:  http://demoserver/arcgisoutput/th/Model.htm
Execution Type: esriExecutionTypeAsynchronous
Parameters:
Parameter: Stations
Data Type: GPFeatureRecordSetLayer
Display Name: Stations
Direction: esriGPParameterDirectionInput
Default Value:

Geometry Type: esriGeometryPoint
Spatial Reference: 102100
Fields:
OBJECTID (Type: esriFieldTypeOID, Alias: OBJECTID)
SHAPE (Type: esriFieldTypeGeometry, Alias: SHAPE)
FVALUE (Type: esriFieldTypeInteger, Alias: FVALUE)
Parameter Type: esriGPParameterTypeRequired
Category:


Parameter: Idw_1

Data Type: GPRasterDataLayer
Display Name: Idw_1
Direction: esriGPParameterDirectionOutput
Parameter Type: esriGPParameterTypeRequired
Category:

and the call code is :
            GraphicsLayer graphicsLayer = (GraphicsLayer)myMap.Layers["test"];
          
            Random rand = new Random();
            List<Graphic> lstItems = new List<Graphic>();
            foreach (Graphic g in graphicsLayer.Graphics)
            {
                g.Attributes["FVALUE"] = rand.Next(1, 12);
                lstItems.Add(g);               
            }
            FeatureSet fs = new FeatureSet(lstItems);
            fs.SpatialReference = new SpatialReference(102100);

            lstParms.Add(new GPFeatureRecordSetLayer("Stations", fs));
            geoprocessorTask.SubmitJobAsync(lstParms);

especially, i want pass some points with attribute,and then according these point's attribute call the GP to generator IDW Raster,but how to pass the parameter??
thx

Outcomes