<?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: Write floating point value to SDE/PostGIS in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441494#M34581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Berend,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having the same problem! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How you solve that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;António Sérgio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 May 2012 11:26:07 GMT</pubDate>
    <dc:creator>AntonioSergio</dc:creator>
    <dc:date>2012-05-23T11:26:07Z</dc:date>
    <item>
      <title>Write floating point value to SDE/PostGIS</title>
      <link>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441493#M34580</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;I'm trying to insert a new row into an SDE/PostGIS database, using Python. The field is defined as numeric(38,8) in PostgreSQL, and as double in ArcCatalog. The decimal symbol in windows' language settings is set to '.'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's some sample code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;featureClass = "Database Connections\Connection to sde\sde.schema.featureclass"
rows = arcpy.InsertCursor(featureClass)
row = rows.newRow() 
row.value = 1.88
rows.insertRow(row)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;This results in a value '1' in the table. I also tried float(1.88) and '1.88' but these also result in 1. Setting the value to '1,88' results in 188.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I solve this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Berend Veldkamp&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2011 09:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441493#M34580</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2011-11-11T09:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Write floating point value to SDE/PostGIS</title>
      <link>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441494#M34581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Berend,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having the same problem! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How you solve that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;António Sérgio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 11:26:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441494#M34581</guid>
      <dc:creator>AntonioSergio</dc:creator>
      <dc:date>2012-05-23T11:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Write floating point value to SDE/PostGIS</title>
      <link>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441495#M34582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hard to say, one year afterwards &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I seem to remember we never found a fix, but decided to ignore it because the decimals weren't significant anyway (in our case). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest you contact you local ESRI representative, it might be a bug. Who knows?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 12:23:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441495#M34582</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2012-05-23T12:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Write floating point value to SDE/PostGIS</title>
      <link>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441496#M34583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Berend&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 12:28:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441496#M34583</guid>
      <dc:creator>AntonioSergio</dc:creator>
      <dc:date>2012-05-23T12:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Write floating point value to SDE/PostGIS</title>
      <link>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441497#M34584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Berend,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We made some tests and it seems that the problem is from ArcGIS Desktop side: if we change the Desktops Windows 7 Regional Settings from Portuguese (Portugal) format&amp;nbsp; to English (United States), the decimal part of numbers is displayed,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;António Sérgio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 14:13:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/write-floating-point-value-to-sde-postgis/m-p/441497#M34584</guid>
      <dc:creator>AntonioSergio</dc:creator>
      <dc:date>2012-05-25T14:13:43Z</dc:date>
    </item>
  </channel>
</rss>

