Workflow - Buffer Distance / Markup / Toolbar Distances Incorrect
It has been pointed out to me recently that the Buffer that appears on screen is incorrect (see details below). We need a solution ASAP to this issue, our buffer tools are producing bad results! Below I have captured all that I know and what I have tried using the Silverlight Viewer 1.3.
Let us start with the Toolbar :
At first when I looked into the issue, I thought the measure tool was wrong but after some investigation and a fair amount of time tweaking the Viewer Toolbar Behavior settings I discovered that it is the Toolbar that is wrong. You can see this in the images below, the measurement for that particular parcel is roughly 281 feet when measured in ArcMap.
/customer/servlet/servlet.FileDownload?file=00P6000000e883IEAQ /customer/servlet/servlet.FileDownload?file=00P6000000e883NEAQ
Next let's look at the buffer image created by Workflow:
The buffer below is run using the buffer geometry task with a 300 foot distance (yes I know it has been deprecated). We will talk about that below!
Clearly the Markup matches the toolbar but as I have pointed out, the Toolbar is wrong! I did some investigation and found that the parcels select all fall within the bounds of that Markup, which means that the results are incorrect as well as the graphic, this is a problem!
/customer/servlet/servlet.FileDownload?file=00P6000000e883SEAQ
Using the buffer abilities in the site interactively (in other words not in a workflow) :
By using he buffer abilities in the site, making a selection and then applying a buffer will produce a correct markup and selections.
Buffer Task the Buffer Geometry Task Replacement :
With the depreciation of Buffer Geometry I suppose I would not expect to get any help / support figuring out what is going on,so I decided it is time to move to the Buffer Task and see what it can do. That comes with a whole new load of trouble.
1) Lack of documentation makes it very difficult to understand but I did find some forum posts that helped me get it running.
2) Hooking it took me a while, especially getting passed the problem "Buffer Task can crash workflow" discussed in the thread http://support.geocortex.com/Forums/Thread.aspx?pageid=0&mid=2&ItemID=20&thread=45912&postid=132628
3) In the end, the replacement "Buffer Task" does not do any better job a producing a correct Buffer! It produces the same results as above for the 300 foot distance Buffer Geometry.
We need a solution that produces the correct buffer and results.
Louie Rowley
Napa County GIS
-
Do you get the same results when you are running the buffer directly in the Viewer? It seems like you may inadvertently be using an inappropriate global coordinate system for local measurements. Most global coordinate systems cannot be used for accurate local measurements.
For example, if you use a base map service such as ArcGISOnline, it will force your map into the Web Mercator projection. You will then have to override this with an appropriate local coordinate system for measuring and buffering.
You can configure this in the Viewer configuration in REST Manager. Go to the Tool Behaviour configuration screen and input the WKID of a local coordinate system to use for both buffering and measurement. Usually this will be the coordinate system of the dynamic data which you have overlain on the base map.
This process will require you to be using version 1.3 of our viewer or newer.0 -
To clarify the above post:
The stated fix only works for buffers created within the Viewer. Workflow generated buffers will ignore the Viewer settings for buffering projection and must be reprojected manually. To buffer and select accurately when your base map is in Web Mercator and your dynamic service is in a local coordinate system follow these steps:
1. Set the Measurement WKID (in the Viewer settings -- Tool Behavior) to the local coordinate system.
2. Query the State Plane (or other local coordinate system) service to return the geometry to buffer.
3. Buffer the geometry, setting the 'Out Spatial Reference' to the local system.
4. Reproject (Project Task) the returned buffer to Web Mercator for display.
5. Draw the buffer, and use it to select parcels or whatever was intended. If you are selecting from a local coordinate system service and your map is in Web Mercator, the out spatial reference of the Query Task must also be set to Web Mercator.
0 -
For what its worth, below is a buffer flow that uses the "Buffer Task" and the "Project Task". The projection is needed because we have a Web Mercator basemap and our data is in State Plane.
Note: The "Parallel Task" may seem un-needed but it is the need to use the Buffer Result further on in the task.
WORKFLOW:
<Activity mc:Ignorable="sap" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="805,1875" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client" xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:gc="clr-namespace:Geocortex.Core;assembly=Geocortex.Core" xmlns:gcx="http://apis.geocortex.com/2009" xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi" xmlns:ggg="clr-namespace:Geocortex.Gis.Geometries;assembly=Geocortex.Gis" xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting" xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow" xmlns:gwa1="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:mvc="clr-namespace:Microsoft.VisualBasic.CompilerServices;assembly=Microsoft.VisualBasic" xmlns:s="clr-namespace:System;assembly=System" xmlns:s1="clr-namespace:System;assembly=mscorlib" xmlns:s2="clr-namespace:System;assembly=System.Core" xmlns:s3="clr-namespace:System;assembly=System.ServiceModel" xmlns:s4="clr-namespace:System;assembly=System.Web.Services" xmlns:s5="clr-namespace:System;assembly=System.AddIn" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sc="clr-namespace:System.Collections;assembly=mscorlib" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:scg1="clr-namespace:System.Collections.Generic;assembly=System" xmlns:scg2="clr-namespace:System.Collections.Generic;assembly=System.Core" xmlns:scg3="clr-namespace:System.Collections.Generic;assembly=System.ServiceModel" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:sw="clr-namespace:System.Windows;assembly=System.Windows" xmlns:sw1="clr-namespace:System.Windows;assembly=PresentationFramework" xmlns:sw2="clr-namespace:System.Windows;assembly=WindowsBase" xmlns:sw3="clr-namespace:System.Windows;assembly=PresentationCore" xmlns:swt="clr-namespace:System.Windows.Threading;assembly=System.Windows.Presentation" xmlns:swt1="clr-namespace:System.Windows.Threading;assembly=System.Windows" xmlns:swt2="clr-namespace:System.Windows.Threading;assembly=WindowsBase" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="765,1835" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="esri:FeatureSet" Name="parcel" />
<Variable x:TypeArguments="esri:Geometry" Name="geometry" />
<Variable x:TypeArguments="esri:FeatureSet" Name="selectedFeatures" />
<Variable x:TypeArguments="esri:Polygon" Default="[new ESRI.ArcGIS.Client.Geometry.Polygon]" Name="polygon" />
<Variable x:TypeArguments="x:String" Name="variable1" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Sequence DisplayName="Inner Sequence 1" sap:VirtualizedContainerService.HintSize="743,1085">
<Sequence.Variables>
<Variable x:TypeArguments="scg:IEnumerable(esri:Graphic)" Name="graphic" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<gwa1:Alert sap:VirtualizedContainerService.HintSize="721,82" Text="GO!" Title="Get Ready to Click on Map" />
<gwa1:CaptureGeometry CaptureType="[Geocortex.Workflow.Activities.GeometryCaptureType.MapPoint]" DisplayName="Capture Geometry From User Click" sap:VirtualizedContainerService.HintSize="721,82" Result="[geometry]" />
<gwa1:QueryTask DisplayName="Query Task - To find underlying Parcel" Geometry="[geometry]" sap:VirtualizedContainerService.HintSize="721,197" MaxAllowableOffset="0" OutFields="*" QueryServiceUrl="http://YOUR_GIS_SERVER_NAME/ArcGIS/rest/services/Basemap/MapServer/3" Results="[parcel]" ReturnGeometry="True" SpatialRelationship="esriSpatialRelIntersects" />
<gwa1:BufferTask DisplayName="Buffer Task - To determine the geometry" Distance="100" Geometry="[parcel.first().geometry]" GeometryServiceUrl="http://YOUR_GIS_SERVER_NAME/ArcGIS/rest/services/Geometry/GeometryServer" sap:VirtualizedContainerService.HintSize="721,243" OutSpatialReference="[new ESRI.ArcGIS.Client.Geometry.SpatialReference(2226)]" Results="[graphic]" UnionResults="True" Unit="[ESRI.ArcGIS.Client.Tasks.LinearUnit.Foot]" />
<Parallel DisplayName="Parallel - Assign Results to a different variable. Graphic2 will hold the thread open and make it un-usable." sap:VirtualizedContainerService.HintSize="721,197">
<Parallel.Variables>
<Variable x:TypeArguments="scg:IList(esri:Graphic)" Name="graphic2" />
</Parallel.Variables>
<gwa1:ProjectTask FeatureSet="[graphic]" GeometryServiceUrl="http://YOUR_GIS_SERVER_NAME/ArcGIS/rest/services/Geometry/GeometryServer" sap:VirtualizedContainerService.HintSize="325,151" Results="[graphic2]" SpatialReference="[new ESRI.ArcGIS.Client.Geometry.SpatialReference(102100)]" />
<Assign sap:VirtualizedContainerService.HintSize="242,151">
<Assign.To>
<OutArgument x:TypeArguments="esri:Polygon">[polygon]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="esri:Polygon">[CType(graphic2.first().geometry,ESRI.ArcGIS.Client.Geometry.Polygon).Clone]</InArgument>
</Assign.Value>
</Assign>
</Parallel>
</Sequence>
<gwa1:RunExternalCommand CommandName="AddMarkup" CommandParameter="[polygon]" DisplayName="RunExternalCommand - Add buffer Geometry Markup" sap:VirtualizedContainerService.HintSize="743,82" />
<gwa1:QueryTask DisplayName="Query Task - Find Parcels that intersect with buffer geometry" Geometry="[polygon]" sap:VirtualizedContainerService.HintSize="743,197" MaxAllowableOffset="0" OutFields="ASMT" OutSpatialReference="[new ESRI.ArcGIS.Client.Geometry.SpatialReference(102100)]" QueryServiceUrl="http://YOUR_GIS_SERVER_NAME/ArcGIS/rest/services/Basemap/MapServer/3" Results="[selectedFeatures]" ReturnGeometry="True" SpatialRelationship="esriSpatialRelIntersects" />
<gwa1:SelectFeatures ClearCollectionFirst="{x:Null}" DisplayName="Select Features - The Parcels selected by buffer" FeatureSet="[selectedFeatures]" sap:VirtualizedContainerService.HintSize="743,128" LayerId="3" MapServiceId="0" />
<gwa1:SetMapExtent DisplayName="SetMapExtent - Zoom To buffer" Extent="[selectedFeatures.First().Geometry.Extent]" sap:VirtualizedContainerService.HintSize="743,59" />
</Sequence>
</Activity>0 -
Louie, Should/Does this WF show the buffer polygon once completed? I have modified it to select parks surrounding a parcel and I get a return list of parks and no buffer polygon. Any guidance would be appreciated. Jeff
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare