Zum Hauptinhalt gehen

Add Captured Multipoint Geometry to Feature Set?

Kommentare

11 Kommentare

  • Zack Robison
    I may be a bit rusty here but I think that you want to iterate your multipoint, turn each point into an object of the "Graphic" class, and then add that graphic to the featureset's .Features property, which IIRC is itself merely a Collection(Of Graphic).  Make sure that you give your features the data that they need in their fields, its probably eaiest for you to do it during your enumeration.
    0
  • Jessica Gould
    Thank you so much.  Can you provide guidance on how I can iterate through my multipoint?  I've tried several different TypeArguments and they all give me an error.
    0
  • Nico Burgerhart
    I think you could do something like this (paste the contents of the next post in a new workflow with File > New > From Clipboard
    0
  • Jessica Gould
    There are no words to describe how grateful I am to you, Nico!!!  This worked perfectly for me, I would have never ever come up with it. Thank you so much again.
    0
  • Nico Burgerhart
    You're welcome.
    1
  • Emmarita Manzan

    Hi Nico.

    Could you put here the contents of the post that has been deleted, i think. I need the same guidance as Jessica to iterate through my multipoint, and i don't know how to do it.

    Thank you.

    0
  • Jessica Gould

    Emmarita Manzan 

     

    Is this helpful at all?  I can also send the xml if needed

     

    1
  • Emmarita Manzan

    Hi Jessica. Is it possible to have the xaml (xml) file?

    0
  • Jessica Gould

    Try this - please let me know if you have any questions

     

    <Activity mc:Ignorable="sap sap2010 sads" x:Class="ActivityBuilder" mva:VisualBasic.Settings="{x:Null}"
     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:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core"
     xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi"
     xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi"
     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:s="clr-namespace:System;assembly=System.Core"
     xmlns:s1="clr-namespace:System;assembly=System"
     xmlns:s2="clr-namespace:System;assembly=mscorlib"
     xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
     xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
     xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
     xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
     xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
     xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
     xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
      <TextExpression.NamespacesForImplementation>
        <sco:Collection x:TypeArguments="x:String">
          <x:String>System.Activities</x:String>
          <x:String>System.Activities.Statements</x:String>
          <x:String>System.Activities.Expressions</x:String>
          <x:String>System.Activities.Validation</x:String>
          <x:String>System.Activities.XamlIntegration</x:String>
          <x:String>ESRI.ArcGIS.Client</x:String>
          <x:String>ESRI.ArcGIS.Client.Geometry</x:String>
          <x:String>ESRI.ArcGIS.Client.Tasks</x:String>
          <x:String>Geocortex.Core.Extensions</x:String>
          <x:String>Geocortex.Workflow.Activities</x:String>
          <x:String>Geocortex.Forms.Client</x:String>
          <x:String>Geocortex.Forms.Client.Items</x:String>
          <x:String>Geocortex.Reporting</x:String>
          <x:String>System</x:String>
          <x:String>Microsoft.VisualBasic.Activities</x:String>
          <x:String>System.Collections.Generic</x:String>
          <x:String>System.Linq</x:String>
          <x:String>System.Windows.Markup</x:String>
        </sco:Collection>
      </TextExpression.NamespacesForImplementation>
      <TextExpression.ReferencesForImplementation>
        <sco:Collection x:TypeArguments="AssemblyReference">
          <AssemblyReference>System.Activities</AssemblyReference>
          <AssemblyReference>ESRI.ArcGIS.Client</AssemblyReference>
          <AssemblyReference>Geocortex.Core</AssemblyReference>
          <AssemblyReference>Geocortex.Workflow</AssemblyReference>
          <AssemblyReference>Geocortex.EssentialsWpfApi</AssemblyReference>
          <AssemblyReference>Geocortex.Reporting</AssemblyReference>
          <AssemblyReference>System.Core</AssemblyReference>
          <AssemblyReference>System</AssemblyReference>
          <AssemblyReference>mscorlib</AssemblyReference>
          <AssemblyReference>PresentationFramework</AssemblyReference>
          <AssemblyReference>WindowsBase</AssemblyReference>
          <AssemblyReference>PresentationCore</AssemblyReference>
          <AssemblyReference>System.Xaml</AssemblyReference>
        </sco:Collection>
      </TextExpression.ReferencesForImplementation>
      <Sequence mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
        <gwa1:Cast x:TypeArguments="esri:MultiPoint" To="[userGeometryAddmp]">
          <gwa1:Cast.Value>
            <InArgument x:TypeArguments="x:Object">[userGeometryAdd]</InArgument>
          </gwa1:Cast.Value>
          <sap2010:WorkflowViewState.IdRef>Cast`1_1</sap2010:WorkflowViewState.IdRef>
        </gwa1:Cast>
        <Assign>
          <Assign.To>
            <OutArgument x:TypeArguments="esri:PointCollection">[userGeometryAddpc]</OutArgument>
          </Assign.To>
          <Assign.Value>
            <InArgument x:TypeArguments="esri:PointCollection">[userGeometryAddmp.Points]</InArgument>
          </Assign.Value>
          <sap2010:WorkflowViewState.IdRef>Assign_1</sap2010:WorkflowViewState.IdRef>
        </Assign>
        <gwa1:CreateCollection x:TypeArguments="esri:Graphic" Result="[userGeomAddgrph]" sap2010:WorkflowViewState.IdRef="CreateCollection`1_1" />
        <ForEach x:TypeArguments="esri:MapPoint" DisplayName="ForEach&lt;MapPoint&gt;" Values="[userGeometryAddpc]">
          <ActivityAction x:TypeArguments="esri:MapPoint">
            <ActivityAction.Argument>
              <DelegateInArgument x:TypeArguments="esri:MapPoint" Name="pnt" />
            </ActivityAction.Argument>
            <Sequence>
              <Sequence.Variables>
                <Variable x:TypeArguments="esri:Graphic" Name="myGraphic" />
              </Sequence.Variables>
              <Assign DisplayName="Assign2">
                <Assign.To>
                  <OutArgument x:TypeArguments="esri:Graphic">[myGraphic]</OutArgument>
                </Assign.To>
                <Assign.Value>
                  <InArgument x:TypeArguments="esri:Graphic">[new graphic]</InArgument>
                </Assign.Value>
                <sap2010:WorkflowViewState.IdRef>Assign_2</sap2010:WorkflowViewState.IdRef>
              </Assign>
              <Assign DisplayName="Assign1">
                <Assign.To>
                  <OutArgument x:TypeArguments="esri:Geometry">[myGraphic.geometry]</OutArgument>
                </Assign.To>
                <Assign.Value>
                  <InArgument x:TypeArguments="esri:Geometry">[pnt]</InArgument>
                </Assign.Value>
                <sap2010:WorkflowViewState.IdRef>Assign_3</sap2010:WorkflowViewState.IdRef>
              </Assign>
              <AddToCollection x:TypeArguments="esri:Graphic" Collection="[HydrantsADDfs.Features]" DisplayName="AddToCollection&lt;Graphic&gt;" Item="[myGraphic]" sap2010:WorkflowViewState.IdRef="AddToCollection`1_1" />
              <Assign DisplayName="Assign3">
                <Assign.To>
                  <OutArgument x:TypeArguments="x:Object">[myGraphic.attributes("Location")]</OutArgument>
                </Assign.To>
                <Assign.Value>
                  <InArgument x:TypeArguments="x:Object">["some value"]</InArgument>
                </Assign.Value>
                <sap2010:WorkflowViewState.IdRef>Assign_4</sap2010:WorkflowViewState.IdRef>
              </Assign>
              <Assign DisplayName="Assign4">
                <Assign.To>
                  <OutArgument x:TypeArguments="x:Object">[myGraphic.attributes("facilityid")]</OutArgument>
                </Assign.To>
                <Assign.Value>
                  <InArgument x:TypeArguments="x:Object">["{4A0EEC42-36EC-4C65-B91A-92E76612DD15}"]</InArgument>
                </Assign.Value>
                <sap2010:WorkflowViewState.IdRef>Assign_5</sap2010:WorkflowViewState.IdRef>
              </Assign>
              <AddToCollection x:TypeArguments="esri:Graphic" Collection="[HydrantsAll.Features]" DisplayName="AddToCollection&lt;Graphic&gt;" Item="[myGraphic]" sap2010:WorkflowViewState.IdRef="AddToCollection`1_2" />
              <sap2010:WorkflowViewState.IdRef>Sequence_1</sap2010:WorkflowViewState.IdRef>
            </Sequence>
          </ActivityAction>
          <sap2010:WorkflowViewState.IdRef>ForEach`1_1</sap2010:WorkflowViewState.IdRef>
        </ForEach>
        <sap2010:WorkflowViewState.IdRef>Sequence_2</sap2010:WorkflowViewState.IdRef>
        <sads:DebugSymbol.Symbol>dzNDOlxVc2Vyc1xqZXNzaWNhLmdvdWxkLndhXERvY3VtZW50c1xNdWx0aVBvaW50LnhhbWweQQOIAQ4CAQFCBUcRAgEgSAVQDgIBHVEFUY8BAgEbUgWFAQ8CAQJEMERBAgEiQjVCSgIBIU08TVYCAR9KPUpQAgEeUUJRVQIBHFJbUnACARpXCYIBFAIBA1sLYxQCARZkC2wUAgESbQtt2QECAQ5uC3YUAgELdwt/FAIBCIABC4AB1wECAQRgOmBHAgEZXTtdRgIBF2k7aUACARRmPGZQAgETbUZtYAIBEW2TAW2gAQIBD3M2c0QCAQ1wN3BZAgEMfDZ8YAIBCnk3eVsCAQmAAUaAAV4CAQeAAZEBgAGeAQIBBQ==</sads:DebugSymbol.Symbol>
      </Sequence>
      <sap2010:WorkflowViewState.IdRef>ActivityBuilder_1</sap2010:WorkflowViewState.IdRef>
      <sap2010:WorkflowViewState.ViewStateManager>
        <sap2010:ViewStateManager>
          <sap2010:ViewStateData Id="Cast`1_1" sap:VirtualizedContainerService.HintSize="296,60.8" />
          <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="296,60.8" />
          <sap2010:ViewStateData Id="CreateCollection`1_1" sap:VirtualizedContainerService.HintSize="296,62.4" />
          <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="243.2,60.8" />
          <sap2010:ViewStateData Id="Assign_3" sap:VirtualizedContainerService.HintSize="243.2,60.8" />
          <sap2010:ViewStateData Id="AddToCollection`1_1" sap:VirtualizedContainerService.HintSize="243.2,22.4" />
          <sap2010:ViewStateData Id="Assign_4" sap:VirtualizedContainerService.HintSize="243.2,60.8" />
          <sap2010:ViewStateData Id="Assign_5" sap:VirtualizedContainerService.HintSize="243.2,60.8" />
          <sap2010:ViewStateData Id="AddToCollection`1_2" sap:VirtualizedContainerService.HintSize="243.2,22.4" />
          <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="265.6,612.8">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
          </sap2010:ViewStateData>
          <sap2010:ViewStateData Id="ForEach`1_1" sap:VirtualizedContainerService.HintSize="296,761.6">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                <x:Boolean x:Key="IsPinned">False</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
          </sap2010:ViewStateData>
          <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="318.4,1190.4">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
          </sap2010:ViewStateData>
          <sap2010:ViewStateData Id="ActivityBuilder_1" sap:VirtualizedContainerService.HintSize="358.4,1270.4" />
        </sap2010:ViewStateManager>
      </sap2010:WorkflowViewState.ViewStateManager>
    </Activity>

    0
  • Emmarita Manzan

    Thank you so much. It's been very useful.

    0
  • Peter Milenkovic

    Thanks as well. Found this useful to iterate through map points (capture coordinate pairs) in a multipoint geometry

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.