<?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 Use JSON_OBJECT() with SDE.ST_GEOMETRY in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/use-json-object-with-sde-st-geometry/m-p/1169607#M33058</link>
    <description>&lt;P&gt;I'm wondering if there's anyone&amp;nbsp;out there who has&amp;nbsp;&lt;STRONG&gt;Oracle 21c&lt;/STRONG&gt; and &lt;STRONG&gt;SDE.ST_GEOMETRY&lt;/STRONG&gt;&amp;nbsp;who could help me with a quick test:&lt;/P&gt;&lt;P&gt;If you were to run this query in Oracle 21c, what would it do?&lt;/P&gt;&lt;PRE&gt;select&lt;BR /&gt;&amp;nbsp; &amp;nbsp; json_object(&lt;STRONG&gt;sde.st_geometry&lt;/STRONG&gt;('MULTILINESTRING ((0.0 5.0, 10.0 10.0, 30.0 0.0), (50.0 10.0, 60.0 10.0))', 26917)) as sdo_geom&lt;BR /&gt;from&lt;BR /&gt;&amp;nbsp; &amp;nbsp; dual&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background:&lt;/P&gt;&lt;P&gt;I suspect that some new functionality has been added to the &lt;A href="https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/JSON_OBJECT.html" target="_self"&gt;JSON_OBJECT()&lt;/A&gt; function in Oracle 21c. I have 18c, not 21c, so I'm not able to test it myself.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the following SDO_GEOMETRY query works in 21c in an online environment called &lt;A href="https://dbfiddle.uk/?rdbms=oracle_21&amp;amp;fiddle=a7e03c94223fe2dc9590c70edf0a842b" target="_self"&gt;db&amp;lt;&amp;gt;fiddle&lt;/A&gt;. Of course, that environment doesn't have the SDE.ST_GEOMETRY datatype, so I can't do the ST_GEOMETRY test there.&lt;/P&gt;&lt;PRE&gt;select&lt;BR /&gt;&amp;nbsp; &amp;nbsp; json_object(&lt;STRONG&gt;sdo_geometry&lt;/STRONG&gt;('MULTILINESTRING ((0.0 5.0, 10.0 10.0, 30.0 0.0), (50.0 10.0, 60.0 10.0))')) as sdo_geom&lt;BR /&gt;from&lt;BR /&gt;&amp;nbsp; &amp;nbsp; dual&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;BR /&gt;{"SDO_GTYPE":2006,"SDO_SRID":null,"SDO_POINT":{},"SDO_ELEM_INFO":[1,2,1,7,2,1],"SDO_ORDINATES":[0,5,10,10,30,0,50,10,60,10]}&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Related:&amp;nbsp;&lt;A href="https://community.oracle.com/tech/apps-infra/discussion/4498005/select-json-text-of-sdo-geometry-using-sql/" target="_self"&gt;Select JSON text of SDO_GEOMETRY using SQL&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm curious what would happen if we did something similar in Oracle 21c, but with SDE.ST_GEOMETRY, instead of SDO_GEOMETRY.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Sun, 01 May 2022 14:29:11 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2022-05-01T14:29:11Z</dc:date>
    <item>
      <title>Use JSON_OBJECT() with SDE.ST_GEOMETRY</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/use-json-object-with-sde-st-geometry/m-p/1169607#M33058</link>
      <description>&lt;P&gt;I'm wondering if there's anyone&amp;nbsp;out there who has&amp;nbsp;&lt;STRONG&gt;Oracle 21c&lt;/STRONG&gt; and &lt;STRONG&gt;SDE.ST_GEOMETRY&lt;/STRONG&gt;&amp;nbsp;who could help me with a quick test:&lt;/P&gt;&lt;P&gt;If you were to run this query in Oracle 21c, what would it do?&lt;/P&gt;&lt;PRE&gt;select&lt;BR /&gt;&amp;nbsp; &amp;nbsp; json_object(&lt;STRONG&gt;sde.st_geometry&lt;/STRONG&gt;('MULTILINESTRING ((0.0 5.0, 10.0 10.0, 30.0 0.0), (50.0 10.0, 60.0 10.0))', 26917)) as sdo_geom&lt;BR /&gt;from&lt;BR /&gt;&amp;nbsp; &amp;nbsp; dual&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background:&lt;/P&gt;&lt;P&gt;I suspect that some new functionality has been added to the &lt;A href="https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/JSON_OBJECT.html" target="_self"&gt;JSON_OBJECT()&lt;/A&gt; function in Oracle 21c. I have 18c, not 21c, so I'm not able to test it myself.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the following SDO_GEOMETRY query works in 21c in an online environment called &lt;A href="https://dbfiddle.uk/?rdbms=oracle_21&amp;amp;fiddle=a7e03c94223fe2dc9590c70edf0a842b" target="_self"&gt;db&amp;lt;&amp;gt;fiddle&lt;/A&gt;. Of course, that environment doesn't have the SDE.ST_GEOMETRY datatype, so I can't do the ST_GEOMETRY test there.&lt;/P&gt;&lt;PRE&gt;select&lt;BR /&gt;&amp;nbsp; &amp;nbsp; json_object(&lt;STRONG&gt;sdo_geometry&lt;/STRONG&gt;('MULTILINESTRING ((0.0 5.0, 10.0 10.0, 30.0 0.0), (50.0 10.0, 60.0 10.0))')) as sdo_geom&lt;BR /&gt;from&lt;BR /&gt;&amp;nbsp; &amp;nbsp; dual&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;BR /&gt;{"SDO_GTYPE":2006,"SDO_SRID":null,"SDO_POINT":{},"SDO_ELEM_INFO":[1,2,1,7,2,1],"SDO_ORDINATES":[0,5,10,10,30,0,50,10,60,10]}&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Related:&amp;nbsp;&lt;A href="https://community.oracle.com/tech/apps-infra/discussion/4498005/select-json-text-of-sdo-geometry-using-sql/" target="_self"&gt;Select JSON text of SDO_GEOMETRY using SQL&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm curious what would happen if we did something similar in Oracle 21c, but with SDE.ST_GEOMETRY, instead of SDO_GEOMETRY.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 14:29:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/use-json-object-with-sde-st-geometry/m-p/1169607#M33058</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-05-01T14:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Use JSON_OBJECT() with SDE.ST_GEOMETRY</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/use-json-object-with-sde-st-geometry/m-p/1169614#M33059</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I’m aware that ArcGIS Server can return JSON in a feature service from a feature class. I still want to experiment with JSON and SQL.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 14:26:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/use-json-object-with-sde-st-geometry/m-p/1169614#M33059</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-05-01T14:26:52Z</dc:date>
    </item>
  </channel>
</rss>

