<?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: SDE to STGeometry in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670358#M38013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Keith&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is the Data Interoperability extension.&amp;nbsp; It supports all the native spatial types in DBMS platforms supported by SDE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Quick Export geoprocessing tool would be the simplest option to migrate SDE layers one at a time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Apr 2012 14:13:32 GMT</pubDate>
    <dc:creator>BruceHarold</dc:creator>
    <dc:date>2012-04-02T14:13:32Z</dc:date>
    <item>
      <title>SDE to STGeometry</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670356#M38011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'll spare you the details, but I need to move an SDE Featureclass to SQL Spatial Type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For various reasons I can't use Shape2SQL, nor a python script that I have to read/write geometries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to move it using SSMS from my SDE DB to my plain ole regular SQL DB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Found some stuff online that said the following should work, but I get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Msg 257, Level 16, State 3, Line 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Implicit conversion from data type geometry to varbinary is not allowed. Use the CONVERT function to run this query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;declare @g varbinary(max);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set @g = 0x3200000001000000A6D0E5BEAA0681AFEFC0D713D4F705ECD5F30497E222BA049DB30597B1BB04B080B704ADEA018C3DA8F937DCDCD904FAC401;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;declare @h geometry;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set @h =&amp;nbsp; geometry::STGeomFromWKB(convert(geometry, @g), 3857)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;select @h FEATURE_SHAPE&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or the same implementation on the table directly, acting upon the same geometry as above:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; geometry::STGeomFromWKB(convert(geometry, points), 3857) as FEATURE_SHAPE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; FROM [SDE_WORK_GIS].[sde].[f216]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; where fid = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Other methods result in errors indicating that the varbinary format is invalid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Read/writing to datatype geometry using python results in the following geometry binary, completely different (kind of expect that since the datatypes are different):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;0x110F0000010407000000AEB662F3667861C1091B9EE6B5464B418A8EE48E677861C10F0BB5CEB4454B41228E75FF637861C15AF5B9D2B4454B41637FD971637861C13EE8D9DC9E464B4153962162297861C152B81E9D9F464B419A999955297861C1D656EC87B6464B41AEB662F3667861C1091B9EE6B5464B4101000000020000000001000000FFFFFFFF0000000003&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recently back from the Dev Summit where numerous Product Engineers and the like said this could be done, and that SDE stores geometry in the same format as SQL ST. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thoughts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Apr 2012 22:25:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670356#M38011</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2012-04-01T22:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: SDE to STGeometry</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670357#M38012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcSDE's SDEBINARY format is not the same as Microsoft's native GEOMETRY or GEOGRAPHY.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Only when a layer is configured to use GEOMETRY/GEOGRAPHY would it be the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ArcSDE API can export SDEBINARY as well-known text or well-known binary, but that &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;couldn't be done using SSMS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your easiest solution is to start over with ArcSDE in a new database, using an owner other&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;than 'sde' (as per best practice), with a default storage of GEOMETRY, and copy your old data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;into the new database. Then you can use Microsoft tools to migrate the Microsoft-formatted&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;geometry objects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have more flexibilty in the way you export the data, you could write a simple 'C' or Java&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcSDE API app (or just use the 'sdequery' utility of &lt;/SPAN&gt;&lt;A href="ftp://ftp.esri.com/pub/staff/vangelo/se_toolkit/index.html"&gt;se_toolkit&lt;/A&gt;&lt;SPAN&gt;) to create the needed data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;stream of ASCII or binary data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 02:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670357#M38012</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2012-04-02T02:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: SDE to STGeometry</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670358#M38013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Keith&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is the Data Interoperability extension.&amp;nbsp; It supports all the native spatial types in DBMS platforms supported by SDE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Quick Export geoprocessing tool would be the simplest option to migrate SDE layers one at a time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 14:13:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670358#M38013</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2012-04-02T14:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: SDE to STGeometry</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670359#M38014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Vince/Bruce,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the direction and clarification. I'll chalk up the info I got at the Dev Summit as just overly simplified, not incorrect. Nevertheless the Dev Summit was awesome and extremely helpful, as usual.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure about redoing SDE just for this issue, and I just paid my maintenance, so no more toys (Interop) this year.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Guess I'll just muddle through until 10.1 is released, then it is on!&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;Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 16:04:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-to-stgeometry/m-p/670359#M38014</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2012-04-02T16:04:40Z</dc:date>
    </item>
  </channel>
</rss>

