<?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 SoapConverter FromSoap Bug? in ArcGIS Explorer Desktop Questions</title>
    <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/soapconverter-fromsoap-bug/m-p/32201#M185</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;BR /&gt;&lt;SPAN&gt;The more I think about this, the more I think it is not a big deal. But in case someone down the road comes across the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the SoapConverter to get a Geometry from a FeatureLayer. Most everything works well and I have a workaround but stumbled across what seems like a bug. Please let me know if it is, or, if I'm doing something wrong please let me know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is in the *apparent* CoordinateSystem of the converted object. I say *apparent* because the *data* is in the correct coordinate system. That is the coordinate system that the FeatureLayer defines in its CoordinateSystem Property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the CoordinateSystem of the converted Geometry says WKID = 4326. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this state I can???t do anything with the Geometry object because it is invalid, apparent coordinate system of 4326 and data in 3857. I did find that I can just assign the FeatureLayer.CoordinateSystem Property to the convertedGeometry.CoordinateSystem Property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is some code that may help my post make sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Get the PolygonB bytes from the FeatureLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XmlDocument doc = new XmlDocument();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;doc.LoadXml(featureLayer.DataSourceProperties.XmlRecordSet);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XmlNodeList nodes = doc.GetElementsByTagName("Bytes");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;byte[] bytes = Convert.FromBase64String(nodes[0].InnerText);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//PolygonB is an object in the SOAP API. We have created a Proxy Library for these classes &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PolygonB polygonB = new PolygonB { Bytes = bytes };&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;agxGeometry = SoapConverter.FromSoap&amp;lt;ESRI.ArcGISExplorer.Geometry.Geometry&amp;gt;(polygonB);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//We should now have an AGX Geometry that we can work with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// However, The CoordinateSystem is wrong. It is the *BaseGeographicCoordinateSystem* &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// of the FeatureLayer. The following line seems to fix it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;agxGeometry.CoordinateSystem = featureLayer.CoordinateSystem;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Now we have an AGX Geometry and can do what we need to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks much,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2012 19:35:07 GMT</pubDate>
    <dc:creator>BrianKowalski</dc:creator>
    <dc:date>2012-10-24T19:35:07Z</dc:date>
    <item>
      <title>SoapConverter FromSoap Bug?</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/soapconverter-fromsoap-bug/m-p/32201#M185</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;BR /&gt;&lt;SPAN&gt;The more I think about this, the more I think it is not a big deal. But in case someone down the road comes across the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the SoapConverter to get a Geometry from a FeatureLayer. Most everything works well and I have a workaround but stumbled across what seems like a bug. Please let me know if it is, or, if I'm doing something wrong please let me know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is in the *apparent* CoordinateSystem of the converted object. I say *apparent* because the *data* is in the correct coordinate system. That is the coordinate system that the FeatureLayer defines in its CoordinateSystem Property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the CoordinateSystem of the converted Geometry says WKID = 4326. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this state I can???t do anything with the Geometry object because it is invalid, apparent coordinate system of 4326 and data in 3857. I did find that I can just assign the FeatureLayer.CoordinateSystem Property to the convertedGeometry.CoordinateSystem Property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is some code that may help my post make sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Get the PolygonB bytes from the FeatureLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XmlDocument doc = new XmlDocument();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;doc.LoadXml(featureLayer.DataSourceProperties.XmlRecordSet);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XmlNodeList nodes = doc.GetElementsByTagName("Bytes");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;byte[] bytes = Convert.FromBase64String(nodes[0].InnerText);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//PolygonB is an object in the SOAP API. We have created a Proxy Library for these classes &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PolygonB polygonB = new PolygonB { Bytes = bytes };&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;agxGeometry = SoapConverter.FromSoap&amp;lt;ESRI.ArcGISExplorer.Geometry.Geometry&amp;gt;(polygonB);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//We should now have an AGX Geometry that we can work with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// However, The CoordinateSystem is wrong. It is the *BaseGeographicCoordinateSystem* &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// of the FeatureLayer. The following line seems to fix it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;agxGeometry.CoordinateSystem = featureLayer.CoordinateSystem;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Now we have an AGX Geometry and can do what we need to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks much,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 19:35:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/soapconverter-fromsoap-bug/m-p/32201#M185</guid>
      <dc:creator>BrianKowalski</dc:creator>
      <dc:date>2012-10-24T19:35:07Z</dc:date>
    </item>
  </channel>
</rss>

