ArcGIS GP地理處理相關資料收集整理

暖楓無敵發表於2012-07-19

ESRI官方中文文件:

http://help.arcgis.com/zh-cn/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/na/00930000003n000000/

 

其他收藏整理連結如下:

----------------------------------------------------------------------------------------------------------------
ArcGIS Server GP服務使用常見錯誤總結 :

http://www.cnblogs.com/potential/archive/2012/05/18/GP.html


----------------------------------------------------------------------------------------------------------------
ESRI Help

http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geoprocessing/guide_-1963186772.htm

----------------------------------------------------------------------------------------------------------------

GP建立及釋出

http://uwmgisinfo.uwm.edu/Lists/Posts/Post.aspx?ID=20

-----------------------------------------------------------------------------------------------------------------

ESRI Help Document

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_geoprocessing/002s00000001000000/

------------------------------------------------------------------------------------------------------------------

GP Raster

http://blog.csdn.net/moofell/article/details/6101204

-------------------------------------------------------------------------------------------------------------------

Flex 呼叫GP服務

http://futureeye.iteye.com/blog/1066458

-------------------------------------------------------------------------------------------------------------------

CSDN部落格

http://blog.csdn.net/heyubingzju/article/category/703695

-------------------------------------------------------------------------------------------------------------------

GP繪製等值線

http://bbs.esrichina-bj.cn/ESRI/archiver/?tid-113584.html

-------------------------------------------------------------------------------------------------------------------

ESRI 中文幫助文件

http://help.arcgis.com/zh-cn/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//00930000003s000000

-------------------------------------------------------------------------------------------------------------------

GP 工具使用
http://www.cnblogs.com/gisangela/archive/2011/01/06/1927702.html

-------------------------------------------------------------------------------------------------------------------

視訊教程

http://v.26vv.cn/video/mfzggz3jomqgo4bazlj4nnn5zsz4y

 

 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ModelBuilder

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_ModelBuilder/002w00000001000000/

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

ArcGIS API for Silverlight呼叫GP程式

#region GP呼叫

        Geoprocessor _geoprocessorTask;

        public void GP()
        {
            _geoprocessorTask = new Geoprocessor("http://lius/ArcGIS/rest/services/gprater/GPServer/Model");
            List<GPParameter> parameters = new List<GPParameter>();
            parameters.Add(new GPFeatureRecordSetLayer("ZPts", "http://localhost/a.txt"));
            _geoprocessorTask.SubmitJobAsync(parameters);
            _geoprocessorTask.JobCompleted += new EventHandler<JobInfoEventArgs>(_geoprocessorTask_JobCompleted);
            _geoprocessorTask.Failed += GeoprocessorTask_Failed;
        }

        private void _geoprocessorTask_JobCompleted(object sender, JobInfoEventArgs e)
        {
            Geoprocessor geoprocessorTask = sender as Geoprocessor;
            geoprocessorTask.GetResultDataCompleted += GeoprocessorTask_GetResultDataCompleted;
            geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "output");
        }

        private void GeoprocessorTask_GetResultDataCompleted(object sender, GPParameterEventArgs e)
        {
            Geoprocessor geoprocessorTask = sender as Geoprocessor;
            _geoprocessorTask.GetResultImageLayerAsync(geoprocessorTask.SubmitJobLastResult.JobId, e.Parameter.Name);
            _geoprocessorTask.GetResultImageLayerCompleted += new EventHandler<GetResultImageLayerEventArgs>

(_geoprocessorTask_GetResultImageLayerCompleted);
        }

        void _geoprocessorTask_GetResultImageLayerCompleted(object sender, GetResultImageLayerEventArgs e)
        {
            GPResultImageLayer mGPResultImageLAyer = e.GPResultImageLayer;
            myMap.Layers.Clear();
            myMap.Layers.Add(mGPResultImageLAyer);
        }

        private void GeoprocessorTask_Failed(object sender, TaskFailedEventArgs e)
        {
            MessageBox.Show(e.Error.ToString());
        }

        #endregion

        #region GP呼叫方式二

        FeatureSet featureset = new FeatureSet();
        Geoprocessor _Jobprocessor;
        List<GPParameter> Jobgpparameter = new List<GPParameter>();
        public MainPage()
        {
            InitializeComponent();
            _Jobprocessor = new Geoprocessor

("http://192.168.0.104/ArcGIS/rest/services/CounterService/GPServer/Counter");
            _Jobprocessor.UpdateDelay = 5000;
            _Jobprocessor.OutputSpatialReference = myMap.SpatialReference;
            _Jobprocessor.JobCompleted += new EventHandler<JobInfoEventArgs>(_Jobprocessor_JobCompleted);
            _Jobprocessor.Failed += new EventHandler<TaskFailedEventArgs>(_Jobprocessor_Failed);
        }

        void _Jobprocessor_Failed(object sender, TaskFailedEventArgs e)
        {
            MessageBox.Show("錯誤:" + e.Error.ToString());
        }

        void _Jobprocessor_JobCompleted(object sender, JobInfoEventArgs e)
        {
            Geoprocessor geoprocessorTask = sender as Geoprocessor;
            geoprocessorTask.GetResultDataCompleted += new EventHandler<GPParameterEventArgs>

(_geoprocessor_GetResultDataCompleted);
            geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "OutPut_shp");
        }

        void _geoprocessor_GetResultDataCompleted(object sender, GPParameterEventArgs e)
        {
            GraphicsLayer graphiclayer = myMap.Layers["CounterLayer"] as GraphicsLayer;
            GPFeatureRecordSetLayer gplayer = e.Parameter as GPFeatureRecordSetLayer;
            foreach (Graphic graphic in gplayer.FeatureSet.Features)
            {
                graphic.Symbol = LayoutRoot.Resources["CounterSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol;
                graphiclayer.Graphics.Add(graphic);
            }
        }

        private void Map_MouseClick(object sender, Map.MouseEventArgs e)
        {
            GraphicsLayer gplayer = myMap.Layers["MyGraphicLayer"] as GraphicsLayer;
            Graphic[] gp = new Graphic[10];
            for (int i = 0; i < gp.Length; i++)
            {
                gp[i] = new Graphic()
                {
                    Geometry = new MapPoint(e.MapPoint.X + 100 * i, e.MapPoint.Y + 100 * i),
                    Symbol = new SimpleMarkerSymbol()
                    {
                        Size = 9,
                        Color = new SolidColorBrush(Colors.Red),
                        Style = SimpleMarkerSymbol.SimpleMarkerStyle.Circle
                    }
                };
                string Location = string.Format("x:{0},y:{1}", e.MapPoint.X + 100 * i, e.MapPoint.Y + 100 * i);
                gp[i].Attributes.Add("Location", Location);
                gp[i].Attributes.Add("PolutionC", i);
            }
            foreach (Graphic g in gp)
            {
                gplayer.Graphics.Add(g);
                featureset.Features.Add(g);
            }

        }
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show(featureset.Features.Count.ToString());
            Jobgpparameter.Add(new GPFeatureRecordSetLayer("PollutionPoints", featureset));
            Jobgpparameter.Add(new GPDouble("CounterSpacing", 1));
            _Jobprocessor.SubmitJobAsync(Jobgpparameter);
        }

        #endregion


 

 

 

相關文章