${iServerJava6R_GeometryOverlayAnalystParams_Title}

${iServerJava6R_GeometryOverlayAnalystParams_Description}

Inheritance: OverlayAnalystParameters
        private void GenerateAbsoluteUrl(GeometryOverlayAnalystParameters Overlayparams)
        {
            if (Overlayparams == null)
            {
                throw new ArgumentNullException("请求服务参数为空!");
            }

            //http://192.168.11.154:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/overlay
            if (this.Url.EndsWith("/"))
            {
                this.Url += "geometry/overlay.json?debug=true&returnContent=true";
            }
            else
            {
                this.Url += "/geometry/overlay.json?debug=true&returnContent=true";
            }
        }
        internal static System.Collections.Generic.Dictionary<string, string> ToDictionary(GeometryOverlayAnalystParameters geometryOverlayParams)
        {
            var dict = new System.Collections.Generic.Dictionary<string, string>();
            if (geometryOverlayParams.SourceGeometry != null)
            {
                dict.Add("sourceGeometry", ServerGeometry.ToJson(geometryOverlayParams.SourceGeometry.ToServerGeometry()));
            }
            else
            {
                dict.Add("sourceGeometry", ServerGeometry.ToJson(new ServerGeometry()));
            }

            if (geometryOverlayParams.OperateGeometry != null)
            {
                dict.Add("operateGeometry", ServerGeometry.ToJson(geometryOverlayParams.OperateGeometry.ToServerGeometry()));
            }
            else
            {
                dict.Add("operateGeometry", ServerGeometry.ToJson(new ServerGeometry()));
            }

            dict.Add("operation", "\"" + geometryOverlayParams.Operation.ToString() + "\"");
            return dict;
        }
 private System.Collections.Generic.Dictionary<string, string> GetDictionaryParameters(GeometryOverlayAnalystParameters parameters)
 {
     return GeometryOverlayAnalystParameters.ToDictionary((GeometryOverlayAnalystParameters)parameters);
 }
 /// <summary>${iServerJava6R_GeometryOverlayAnalystService_method_ProcessAsync_D}</summary>
 /// <param name="Overlayparams">${iServerJava6R_GeometryOverlayAnalystService_method_ProcessAsync_param_Parameters}</param>
 /// <param name="state">${iServerJava6R_GeometryOverlayAnalystService_method_ProcessAsync_param_state}</param>
 public void ProcessAsync(GeometryOverlayAnalystParameters Overlayparams, object state)
 {
     GenerateAbsoluteUrl(Overlayparams);
     base.SubmitRequest(this.Url, GetDictionaryParameters(Overlayparams), new EventHandler<RequestEventArgs>(OverlayAnalystService_Complated), state, true, false, false);
 }
 /// <summary>${iServerJava6R_GeometryOverlayAnalystService_method_ProcessAsync_D}</summary>
 /// <overloads>${iServerJava6R_GeometryOverlayAnalystService_method_ProcessAsync_overloads_D}</overloads>
 public void ProcessAsync(GeometryOverlayAnalystParameters OverlayParams)
 {
     ProcessAsync(OverlayParams, null);
 }
        //实体叠加
        private void geometryOverlay_Click(object sender, RoutedEventArgs e)
        {
            var geometryOverlayParams = new GeometryOverlayAnalystParameters
            {
                OperateGeometry = new GeoRegion
                {
                    //Points = new Point2DCollection
                    //   {
                    //       new Point2D{X=23,Y=23},
                    //       new Point2D{X=33,Y=22},
                    //       new Point2D{X=43,Y=22}
                    //   }
                    Parts = new ObservableCollection<Point2DCollection>
                               {
                                   new Point2DCollection()
                                       {        new Point2D{X=23,Y=23},
                                           new Point2D{X=33,Y=22},
                                           new Point2D{X=43,Y=22}

                                       },
                               },
                },
                SourceGeometry = new GeoRegion
                {
                    //Type = ServerGeometryType.REGION,
                    //Points = new Point2DCollection
                    // {
                    //     new Point2D{X=23,Y=23},
                    //     new Point2D{X=34,Y=47},
                    //     new Point2D{X=50,Y=12}
                    // }
                    Parts = new ObservableCollection<Point2DCollection>
                               {
                                   new Point2DCollection()
                                       {        new Point2D{X=23,Y=23},
                                           new Point2D{X=34,Y=47},
                                           new Point2D{X=50,Y=12}

                                       },
                               },
                },

                Operation = OverlayOperationType.CLIP
            };

            var geometryOverlayService = new GeometryOverlayAnalystService(url);
            geometryOverlayService.ProcessAsync(geometryOverlayParams);
            geometryOverlayService.Failed += new EventHandler<SuperMap.Web.Service.ServiceFailedEventArgs>(geometryOverlayService_Failed);
            geometryOverlayService.ProcessCompleted += new EventHandler<GeometryOverlayAnalystArgs>(geometryOverlayService_ProcessCompleted);
        }