<?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: PostgreSQL - pg_geometry in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/postgresql-pg-geometry/m-p/644498#M50238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-postgresql/data-types-postgresql.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-postgresql/data-types-postgresql.htm"&gt;PostgreSQL data types supported in ArcGIS—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Sep 2016 09:37:08 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2016-09-12T09:37:08Z</dc:date>
    <item>
      <title>PostgreSQL - pg_geometry</title>
      <link>https://community.esri.com/t5/python-questions/postgresql-pg-geometry/m-p/644497#M50237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have ArcGIS Server 10.4.1 Advanced &amp;nbsp;with PostgreSQL 9.4.9. and PostGIS&lt;/P&gt;&lt;P&gt;I've created two enterprise geodatabases from ArcCatalog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;db1: with ST_GEOMETRY&lt;/P&gt;&lt;P&gt;db2: with PG_GEOMETRY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;db1 and db2 works fine from the ArcGIS Desktop ArcCatalog (arctoolbox and also python scripts). But when I try running python scripts on&amp;nbsp;the ArcGIS Server, only db1 works. Scrips couldn'nt connect to PG_GEOMETRY db2. I use .sde files generated and tested by ArcCatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;working script, running on the server (ujsde.sde points to db1 with ST_GEOMETRY):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;# Import arcpy module&lt;BR /&gt;import arcpy&lt;BR /&gt;import arcserver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Local variables:&lt;BR /&gt;input_shp = "/home/arcgis/ujshp.shp"&lt;BR /&gt;output_shp = "shp_new"&lt;BR /&gt;sde_conn = "/home/arcgis/ujsde.sde"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Process: Feature Class to Feature Class&lt;BR /&gt;arcpy.FeatureClassToFeatureClass_conversion(input_shp, sde_conn, output_shp)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;failed &lt;SPAN&gt;script, running on the server (ujsde_pg.sde points to db2&amp;nbsp;with PG_GEOMETRY):&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;import arcpy&lt;BR /&gt;import arcserver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Local variables:&lt;BR /&gt;input_shp = "/home/arcgis/ujshp.shp"&lt;BR /&gt;output_shp = "shp_new_pg"&lt;BR /&gt;sde_conn = "/home/arcgis/ujsde_pg.sde"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Process: Feature Class to Feature Class&lt;BR /&gt;arcpy.FeatureClassToFeatureClass_conversion(input_shp, sde_conn, output_shp)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;error:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;[arcgis@... ~]$ /home/arcgis/server/tools/python /home/arcgis/shp2sde_pg.py&lt;BR /&gt;Connection to database 'ujsde_pg' failed.&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt; File "/home/arcgis/shp2sde_pg.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt; arcpy.FeatureClassToFeatureClass_conversion(input_shp, sde_conn, output_shp)&lt;BR /&gt; File "C:\Program Files\ArcGIS\Server\arcpy\arcpy\conversion.py", line 1694, in FeatureClassToFeatureClass&lt;BR /&gt; raise e&lt;BR /&gt;arcgisscripting.ExecuteError: ERROR 000210: Cannot create output /home/arcgis/ujsde_pg.sde\shp_new2&lt;BR /&gt;Failed to execute (FeatureClassToFeatureClass).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Need some extra environment settings on linux connecting with arcpy to the PG_GEOMETRY based geoadatabse...?&lt;/P&gt;&lt;P&gt;What is the difference between the ArcCatalog ArcPy and the ArcGIS Server ArcPy?&lt;/P&gt;&lt;P&gt;The lib files are in the right folder on the server....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabor&lt;/P&gt;&lt;P&gt;arcgis python api‌&amp;nbsp;arcgisserver‌&amp;nbsp;postgresql postgis*‌&amp;nbsp;&lt;A href="https://community.esri.com/t5/tag/postgresql/tg-p"&gt;#postgresql&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 08:56:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/postgresql-pg-geometry/m-p/644497#M50237</guid>
      <dc:creator>TimarGabor</dc:creator>
      <dc:date>2016-09-12T08:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: PostgreSQL - pg_geometry</title>
      <link>https://community.esri.com/t5/python-questions/postgresql-pg-geometry/m-p/644498#M50238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-postgresql/data-types-postgresql.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-postgresql/data-types-postgresql.htm"&gt;PostgreSQL data types supported in ArcGIS—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 09:37:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/postgresql-pg-geometry/m-p/644498#M50238</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-09-12T09:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: PostgreSQL - pg_geometry</title>
      <link>https://community.esri.com/t5/python-questions/postgresql-pg-geometry/m-p/644499#M50239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for the link!&lt;/P&gt;&lt;P&gt;The postgreSQL is installed with PostGIS. I've successfully run the "Enable Enterprise Geodatabase" from ArcCatalog, the DB&amp;nbsp;became &amp;nbsp;a "PostgreSQL Enterprise Geodatabase". I can run every ArcTool from ArcCatalog, &amp;nbsp;I can create feature classes, etc. But the server-side python scripts don't work &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 12:11:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/postgresql-pg-geometry/m-p/644499#M50239</guid>
      <dc:creator>TimarGabor</dc:creator>
      <dc:date>2016-09-12T12:11:40Z</dc:date>
    </item>
  </channel>
</rss>

