<?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: Using Element and ElementLayer to georeference an image in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-element-and-elementlayer-to-georeference-an/m-p/27997#M737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try this sample?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=2ef4c343494647cc82b64a2d421d5716"&gt;http://www.arcgis.com/home/item.html?id=2ef4c343494647cc82b64a2d421d5716&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Live version: &lt;/SPAN&gt;&lt;A href="http://serverapps.esri.com/SilverlightDemos/GeoReference/"&gt;http://serverapps.esri.com/SilverlightDemos/GeoReference/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It allows you to calculate the parameters needed to correctly place an image, including rotation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, your image must be using the correct projection, or you WILL get very poor results. A skew and/or planar transform added to it will render very poor results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 May 2011 21:15:43 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2011-05-10T21:15:43Z</dc:date>
    <item>
      <title>Using Element and ElementLayer to georeference an image</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-element-and-elementlayer-to-georeference-an/m-p/27995#M735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an un-projected image that I need to georeference.&amp;nbsp; I know the spatial coordinates for the corners of the image, and I need to apply an affine transform to properly place it on the map.&amp;nbsp; I'm trying to do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Image img = new Image();
img.Source = new BitmapImage(_sampleImageUri);
img.Stretch = System.Windows.Media.Stretch.None;
img.SetValue(ESRI.ArcGIS.Client.ElementLayer.EnvelopeProperty, poly.Extent); // Where 'poly' is the image footprint
img.RenderTransform = new System.Windows.Media.MatrixTransform()
{
&amp;nbsp; Matrix = // Parameters calculated based on the MapToScreen() coordinates of the image footprint
&amp;nbsp;&amp;nbsp;&amp;nbsp; new System.Windows.Media.Matrix(xCellsize, yRotation, xRotation, yCellsize, 0, 0); 
};
_elementLayer.Children.Add(img);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This &lt;/SPAN&gt;&lt;STRONG&gt;almost&lt;/STRONG&gt;&lt;SPAN&gt; works.&amp;nbsp; If I apply the transform to an image that's not in the map, the size, rotation, and skew appear to match the footprint.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, the element displayed in the map seems scaled in a way I don't understand.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a better way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 03:57:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-element-and-elementlayer-to-georeference-an/m-p/27995#M735</guid>
      <dc:creator>MichaelDillon</dc:creator>
      <dc:date>2011-05-10T03:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Element and ElementLayer to georeference an image</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-element-and-elementlayer-to-georeference-an/m-p/27996#M736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are using an element layer, you don't have to take care of the map scale and of the current extent. This is done by the framework.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You only have to place your image to the right coordinates (in map coordinates).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What you are doing would probaly work well if you were adding the image on top of the map without using an element layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 07:38:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-element-and-elementlayer-to-georeference-an/m-p/27996#M736</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-05-10T07:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using Element and ElementLayer to georeference an image</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-element-and-elementlayer-to-georeference-an/m-p/27997#M737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try this sample?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=2ef4c343494647cc82b64a2d421d5716"&gt;http://www.arcgis.com/home/item.html?id=2ef4c343494647cc82b64a2d421d5716&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Live version: &lt;/SPAN&gt;&lt;A href="http://serverapps.esri.com/SilverlightDemos/GeoReference/"&gt;http://serverapps.esri.com/SilverlightDemos/GeoReference/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It allows you to calculate the parameters needed to correctly place an image, including rotation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, your image must be using the correct projection, or you WILL get very poor results. A skew and/or planar transform added to it will render very poor results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 21:15:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-element-and-elementlayer-to-georeference-an/m-p/27997#M737</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2011-05-10T21:15:43Z</dc:date>
    </item>
  </channel>
</rss>

