我对前两个包裹进行了 UNION,然后使用 For..Loop 将每个剩余包裹的结果联合起来。
以下是执行 UNION 的代码部分:
Dim sGeom As String = ""
Dim URL As String = "http://serverName/arcgis/rest/services/Utilities/Geometry/GeometryServer/union"
Dim sData As String = "?sr=4251&geometries={|geometryType|:|esriGeometryPolygon|,|geometries|:[Geom1,Geom2]}&f=json".Replace("|", """")
sData = sData.Replace("Geom1", Geom1).Replace("Geom2", Geom2)
sData = sData.Replace("sr=4251", "sr=" & sr)
sData = sData.Replace("""", "%22").Replace("[", "%5B").Replace("]", "%5D").Replace("{", "%7B").Replace("}", "%7D").Replace(":", "%3A").Replace(",", "%2C")
sGeom = ""
sGeom = PostRequest(URL & sData)