Skip to main content

Workflow - Buffer Distance / Markup / Toolbar Distances Incorrect

Comments

4 comments

  • Permanently deleted user

    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
  • Permanently deleted user

    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
  • Permanently deleted user

    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
  • Permanently deleted user

    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

Please sign in to leave a comment.