<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: About Feature layer geometry and query task in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423105#M10890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi jennifer, if i have understood it would be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example 2 objects selected;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Envelope env0 = f.Graphics[0].Geometry.Extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Envelope env1 = f.Graphics[1].Geometry.Extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Envelope result = env0.Union(env1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Geometry = result;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.. Teorically all looks like good, i don't have any errors but no objects are never selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Other of this .... it's necessary now to return from envelope to geometry of union of original geometries, because i'm doing a spatial query between the geometry and some points. Can happen that , for example ,some point are inside envelope but outside geometry .. and that's wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's no way to create a geometry as union of other 2 geometries ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It' right what i'm doing ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks and best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jan 2011 07:58:01 GMT</pubDate>
    <dc:creator>MarcoRosa</dc:creator>
    <dc:date>2011-01-26T07:58:01Z</dc:date>
    <item>
      <title>About Feature layer geometry and query task</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423103#M10888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i have this situation: i have 1 polygon selected on feature layer and query task&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Query query = new ESRI.ArcGIS.Client.Tasks.Query();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureLayer f = _Map.Layers[myLayerName] as FeatureLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_currGeometry = f.Graphics[0].Geometry;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Geometry = _currGeometry;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is ok and work fine if i have just one feature selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if i have for example 2 feature selected , f.Graphics.Count is correctly = 2 , but how i can pass a geometry made with both the object selected ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;_currGeometry should be contais 2 objects instead of one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is there any way to do this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank u very much as usual.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jan 2011 07:37:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423103#M10888</guid>
      <dc:creator>MarcoRosa</dc:creator>
      <dc:date>2011-01-25T07:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: About Feature layer geometry and query task</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423104#M10889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can create an Envelope geometry that Unions the two selected graphic's extent &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Geometry.Envelope_methods.html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Geometry.Envelope_methods.html&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jan 2011 14:32:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423104#M10889</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-01-25T14:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: About Feature layer geometry and query task</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423105#M10890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi jennifer, if i have understood it would be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example 2 objects selected;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Envelope env0 = f.Graphics[0].Geometry.Extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Envelope env1 = f.Graphics[1].Geometry.Extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Envelope result = env0.Union(env1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Geometry = result;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.. Teorically all looks like good, i don't have any errors but no objects are never selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Other of this .... it's necessary now to return from envelope to geometry of union of original geometries, because i'm doing a spatial query between the geometry and some points. Can happen that , for example ,some point are inside envelope but outside geometry .. and that's wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's no way to create a geometry as union of other 2 geometries ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It' right what i'm doing ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks and best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 07:58:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423105#M10890</guid>
      <dc:creator>MarcoRosa</dc:creator>
      <dc:date>2011-01-26T07:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: About Feature layer geometry and query task</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423106#M10891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;There's no way to create a geometry as union of other 2 geometries ?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;With WPF, you can use the Geometry.Combine method. But this one is not available with Silverlight.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With Silverlight you can use the .Net Geometry API to make the union by yourself but it's not that easy (basically if it's a PathGeometry, you have to get the collection of PathFigures, to get the segments inside the PathFigure and to clone them in order to add them to the first geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is you to execute two spatial queries (one by geometry) but for sure there is an impact on performances.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 12:00:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423106#M10891</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-01-26T12:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: About Feature layer geometry and query task</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423107#M10892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank's Dominique, i'll support at the moment the selection of just only one object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See u &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 14:40:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/about-feature-layer-geometry-and-query-task/m-p/423107#M10892</guid>
      <dc:creator>MarcoRosa</dc:creator>
      <dc:date>2011-01-26T14:40:37Z</dc:date>
    </item>
  </channel>
</rss>

