<?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: Calculate WKT in Field using ArcPy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526292#M41197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joshua!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used Shape2SQL but it doesn't seem to like shapefiles with too many features. The file I am trying to convert to SQL Server has around 40,000 features and when I try to use Shape2SQL, it seems to finish but the table is nowhere to be found in the SQL database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should also note that I do not have administrator rights on my machine nor is my SQL Server database enterprise enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So regarding the WKT, could I calculate the WKT for each feature in a DBF table instead of a feature to get around the shapefile limit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2018 14:49:42 GMT</pubDate>
    <dc:creator>RobertFord1</dc:creator>
    <dc:date>2018-05-07T14:49:42Z</dc:date>
    <item>
      <title>Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526290#M41195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm relatively new to ArcPy and saw that there is a way to return the WKT of a polygon via &lt;A href="mailto:SHAPE@WKT"&gt;SHAPE@WKT&lt;/A&gt;&amp;nbsp;but am unsure how to use this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My main goal is to obtain the WKT for each feature in a shapefile, export the shapefile table with the WKT field, then import to SQL Server 2008 R2 using STGeomFromText.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found &lt;A href="https://gis.stackexchange.com/questions/58359/converting-geometry-to-wkt-using-arcpy"&gt;this &lt;/A&gt;on StackExchange but am a little lost on how to implement this over multiple features within a shapefile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 13:01:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526290#M41195</guid>
      <dc:creator>RobertFord1</dc:creator>
      <dc:date>2018-05-07T13:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526291#M41196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless your shapes are extremely simple, your WKT representations will be truncated since shape files have a maximum text field length of 254 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to load the shape file into ArcGIS Destkop, connect to SQL Server, and then copy the data over.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outside of Esri, a quick Google search will show several approaches that will work.&amp;nbsp; For example, &lt;A class="link-titled" href="https://blogs.msdn.microsoft.com/seanboon/2009/11/17/sql-server-2008-r2-map-tips-how-to-import-shapefiles-into-sql-server-and-aggregate-spatial-data/" title="https://blogs.msdn.microsoft.com/seanboon/2009/11/17/sql-server-2008-r2-map-tips-how-to-import-shapefiles-into-sql-server-and-aggregate-spatial-data/"&gt;SQL Server 2008 R2 Map Tips: How To Import Shapefiles Into SQL Server and Aggregate Spatial Data. – Boon Blog&lt;/A&gt;&amp;nbsp; and &lt;A class="link-titled" href="https://alastaira.wordpress.com/ogr2ogr-patterns-for-sql-server/" title="https://alastaira.wordpress.com/ogr2ogr-patterns-for-sql-server/"&gt;OGR2OGR Patterns for SQL Server | Alastair Aitchison&lt;/A&gt;&amp;nbsp; .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 14:07:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526291#M41196</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-05-07T14:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526292#M41197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joshua!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used Shape2SQL but it doesn't seem to like shapefiles with too many features. The file I am trying to convert to SQL Server has around 40,000 features and when I try to use Shape2SQL, it seems to finish but the table is nowhere to be found in the SQL database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should also note that I do not have administrator rights on my machine nor is my SQL Server database enterprise enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So regarding the WKT, could I calculate the WKT for each feature in a DBF table instead of a feature to get around the shapefile limit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 14:49:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526292#M41197</guid>
      <dc:creator>RobertFord1</dc:creator>
      <dc:date>2018-05-07T14:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526293#M41198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The *.dbf is the attribute table of the shapefile and they have the limitation.&amp;nbsp; A file geodatabase table would be best&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 15:11:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526293#M41198</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-07T15:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526294#M41199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your SQL Server database doesn't have to be enterprise enabled to copy into it.&amp;nbsp; If you have create/write permissions, which it seems you do, you can connect to the SQL Server database and use tools like Copy Features to load the data from shape file into SQL Server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 15:37:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526294#M41199</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-05-07T15:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526295#M41200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just tried the copy features tool and it gives me error 000210. DBMS table not found, Attribute column not found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked my roles in SQL Server 2008, and I am listed as db_datareader, db_datawriter, db_ddladmin, db_owner, and public.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 16:44:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526295#M41200</guid>
      <dc:creator>RobertFord1</dc:creator>
      <dc:date>2018-05-07T16:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526296#M41201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which tool did you use, and what arguments did you pass to it?&amp;nbsp; Also, can you provide the whole error traceback as well?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 19:13:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526296#M41201</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-05-07T19:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526297#M41202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried Copy Features and Feature Class to Feature Class tools. Both give the same error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="405991" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/405991_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/405998_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2018 11:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526297#M41202</guid>
      <dc:creator>RobertFord1</dc:creator>
      <dc:date>2018-05-08T11:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526298#M41203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 000210 error is the key, the other errors are just cascading errors from not having creating the table.&amp;nbsp; &lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-00201-00225-000210.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-00201-00225-000210.htm"&gt;000210: Cannot create output .—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The output cannot be created. Potential reasons include data locking, an incorrect path, and limited access rights.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You appear to have pretty broad permissions in the database, so it is hard to troubleshoot further through the back and forth of forums.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens if you connect to the workspace in ArcCatalog and use the GUI to create a new, empty table in the database?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2018 13:45:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526298#M41203</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-05-08T13:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate WKT in Field using ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526299#M41204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys! I figured it out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-sql-server/privileges-sqlserver.htm" style="color: #2989c5; text-decoration: none;"&gt;this guide&lt;/A&gt;&amp;nbsp;where it says your SQL Server database login username and schema have to have the same name. After I created a schema with the same name as my login, I was able to use the Copy Features tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now as a bonus question, do I need to have an Enterprise license to allow ArcMap to edit these SQL Server tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 11:39:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-wkt-in-field-using-arcpy/m-p/526299#M41204</guid>
      <dc:creator>RobertFord1</dc:creator>
      <dc:date>2018-05-09T11:39:39Z</dc:date>
    </item>
  </channel>
</rss>

