Hoppa till huvudinnehållet

Workflow That Generates a Table of Addresses in a Buffer

Kommentarer

10 kommentarer

  • Alex St. John

    Maybe this is helpful.

    I have a change event handler on the geometry picker form element where I buffer the feature selection polygon (=$FeatureGeometryForm.state.geometryPicker1.value.geometry - be sure to get the geometry value from the GeometryRef object) and then query the layer with the buffer.geometry.

    Note that I have run into trouble when I don't have the buffer distance as a list of number. That is, "20" wouldn't work, but "[20]" does work.

    1
  • Kevin Fowler

    Hi Alex St. John,

    This was helpful. I'm still pretty novice to VSW so you'll have to forgive me for asking more basic questions. How do I select a feature based on the location of my point from Geometry Picker?
    I've started with a Form and just the Geometry Picker. I've added a Change Event Handler which you can see below. But when I run this I don't get any results.

    My goal is to open the form and use the geometry picker to select a feature, and then buffer from that selection.

     

    0
  • Yannick Mijnheer

    Hi Kevin,

    Hope you got it to work by now, but if not; it seems that you still have to fill in 'symbol2.symbol' in the symbol of feature2.

    0
  • Kevin Fowler

    Hi Yannick,

    I've been working on this and have shifted my approach somewhat. Essentially all this does is identify the feature right now and display the results, which I like. Now I want to take it further by buffering on that selection.

    0
  • Alex St. John

    What is your Geometry input to buffer1? Just $runOperation1.result?

    Did you try the buffer distance input as a list, [100]?

    0
  • Kevin Fowler

    Alex St. John
    The Geometry input to buffer1 is just $runOperation1.result

    And I tried using [100] with no luck.

    I wonder how I can pass the geometry from the tasks.identify Operation to the input of Buffer Geometry

    0
  • Yannick Mijnheer

    I would suggest using the same geometry for the Buffer as for the runOperation1. So, for geometry fill in $form1.state.geometryPicker1.value.geometry[0] (updated this part).

    A second issue why the graphic doesn't show is that you are missing symbology (or so it seems at least). Add a new activity called 'Get symbol from json' in between the buffer and create-feature activities. Give it the following JSON as input:

    {
      "type": "esriSFS",
      "color": [
        0,
        122,
        194,
        255
      ],
      "outline": {
        "type": "esriSLS",
        "color": [
          0,
          122,
          194,
          255
        ],
        "width": 1,
        "style": "esriSLSSolid"
      },
      "style": "esriSFSSolid"
    }

    Then get the result from that activity (e.g. $symbol1.symbol), and use it as input symbol in the Create Feature-activity. This way you add a symbology to your newly created feature. If you then add that feature to a graphics layer it will show with the symbology from the json above.

    0
  • Kevin Fowler

    Yannick,

    I took your recommendations. This is the error I get in the console window when I try to run the workflow. 'acitivityid: 16' refers to the buffer geometry activity. I know WKID refers to coordinate system ids.

    0
  • Yannick Mijnheer

    Hi Kevin,

    I see I missed something important; the output of the geometrypicker is an array, which doesn't work as input for the buffer activity. I think that should also give an error in the tasks.identify operation, but I'm not sure, you should check the output of that activity in the command.

    The right way to reach the chosen geometry is

    =$form1.state.geometryPicker1.value.geometry[0]

    Hope that helps ;)

    0
  • Nico Burgerhart

    Yannick Mijnheer Yes this is tricky indeed.

    0

Du måste logga in om du vill lämna en kommentar.