Hoppa till huvudinnehållet

Can't select by MapPoint

Kommentarer

8 kommentarer

  • Permanently deleted user

    Hi Josh,

    In order to query a line (or point) layer with a point input, you must first buffer the point so that an intersection is possible.  You can't locate line or point features with a point input, they'll never cross.  

    Use the BufferTask to expand the captured point by some amount (either a constant amount or some calculated amount based on the visible scale, depending on how fancy you get).  Then, when using a small circle instead of a point to query your line layer, you will be able to get results.

    Regards,

    -Malcolm

    0
  • Permanently deleted user

    Hi Malcolm

    'never' is a very strong term  /customer/servlet/servlet.FileDownload?file=00P6000000e87w6EAA   in regards to 'they'll never cross.'

    Unlikely but possible. /customer/servlet/servlet.FileDownload?file=00P6000000e87wLEAQ

    Thanks

    Ralph

    0
  • Permanently deleted user

    Not in ArcGIS Server - I tried keying in a point in a query request once, including all the digits in the coordinate as specified in the geodatabase and didn't get a result.  Since both geometries have only one dimension, they cannot intersect.

    -Malcolm

    0
  • Permanently deleted user

    Hi Malcolm

    I am not sure of the latin for 'fall on ones sword' but you can pretend I just said it in regards to being corrected.  ;-)

    Thanks

    Ralph

    0
  • Permanently deleted user

     

    Hi Malcolm,

    That makes sense but where I get confused is that BufferTask wants the output to be a IEnumerable<Graphic>.  So attached is my code below.  How can I sink up this IEnumerable<graphic> with the QueryTask so I can get a featureset?

    <Activity mc:Ignorable="sap" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="392,1333" 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: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: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:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" 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:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:sw="clr-namespace:System.Windows;assembly=PresentationFramework" xmlns:sw1="clr-namespace:System.Windows;assembly=WindowsBase" xmlns:sw2="clr-namespace:System.Windows;assembly=PresentationCore" xmlns:swt="clr-namespace:System.Windows.Threading;assembly=WindowsBase" xmlns:sxs="clr-namespace:System.Xml.Serialization;assembly=System.Xml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

     

      <Sequence sap:VirtualizedContainerService.HintSize="352,1293" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">

     

        <Sequence.Variables>

     

          <Variable x:TypeArguments="x:String" Name="layer" />

     

          <Variable x:TypeArguments="esri:FeatureSet" Name="features" />

     

          <Variable x:TypeArguments="x:String" Name="bufferStr" />

     

          <Variable x:TypeArguments="esri:Geometry" Name="arcgisGeometry" />

     

          <Variable x:TypeArguments="ggg:Geometry" Name="GeocortexGeometry" />

     

          <Variable x:TypeArguments="ggg:Geometry" Name="bufferGeometry" />

     

          <Variable x:TypeArguments="esri:FeatureSet" Name="bufferedfeature" />

     

          <Variable x:TypeArguments="scg:ICollection(esri:Graphic)" Default="[new System.Collections.Generic.List(Of ESRI.ArcGIS.Client.Graphic)]" Name="GraphicCollection" />

     

          <Variable x:TypeArguments="esri:Geometry" Name="unionedGeometry" />

     

          <Variable x:TypeArguments="esri:Geometry" Name="userGeom" />

     

          <Variable x:TypeArguments="x:String" Name="WellID" />

     

          <Variable x:TypeArguments="x:String" Name="variable1" />

     

          <Variable x:TypeArguments="ggg:Geometry" Name="GeoGeometry" />

     

          <Variable x:TypeArguments="ggg:Geometry" Name="OutGeometryGeoc" />

     

          <Variable x:TypeArguments="esri:Geometry" Name="InESRIGeom" />

     

          <Variable x:TypeArguments="x:Double" Default="100" Name="InDoub" />

     

          <Variable x:TypeArguments="scg:IEnumerable(esri:Graphic)" Name="IEnumGraph" />

     

        </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="330,82" Text="Select Wellbore" Title="Make your Selection" />

     

        <gwa1:CaptureGeometry CaptureType="[Geocortex.Workflow.Activities.GeometryCaptureType.MapPoint]" sap:VirtualizedContainerService.HintSize="330,82" Result="[userGeom]" />

     

        <gwa1:BufferTask Distance="[InDoub]" Geometry="[userGeom]" GeometryServiceUrl="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" sap:VirtualizedContainerService.HintSize="330,243" Results="[IEnumGraph]" Unit="[ESRI.ArcGIS.Client.Tasks.LinearUnit.Meter]" />

     

        <gwa1:QueryTask Geometry="[userGeom]" sap:VirtualizedContainerService.HintSize="330,227" MaxAllowableOffset="0" OutFields="*" QueryServiceUrl="http://someserver/arcgis/rest/services/Desoto/ECMSite/MapServer/2" Results="[features]" ReturnGeometry="True" SpatialRelationship="esriSpatialRelIntersects" />

     

        <gwa1:SortFeatureSet SortDirection="{x:Null}" FeatureSet="[features]" sap:VirtualizedContainerService.HintSize="330,105" SortAttribute="Well_ID" />

     

        <gwa1:DisplayHyperlink sap:VirtualizedContainerService.HintSize="330,230" HyperlinkText="View Additional Content" Uri="[&quot;http://live/livelinkasp/llwellfile.asp?wellid=&quot; + features.features.first().attributes(&quot;Well_ID&quot;).ToString()]" />

     

      </Sequence>

     

    </Activity>
    0
  • Permanently deleted user

     

    I think I figured out my last problem.  I used a foreach loop with a graphics collection and then used a union off of that and it seemed to work. for the rest of my workflow.

    0
  • Permanently deleted user

    Hi Josh,

    If you know that you'll only ever be buffering one feature, you can just grab the first result:

    bufferResults.First().Geometry

    Using a foreach loop is much safer, though, in case you get some other number of results (like zero!)

    Regards,

    -Malcolm

    0
  • Permanently deleted user

    Thanks Malcolm, I'll definitely take that into consideration

    0

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