<?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>idea Mid Point function in SDE.ST_GEOMETRY in Developers Ideas</title>
    <link>https://community.esri.com/t5/developers-ideas/mid-point-function-in-sde-st-geometry/idi-p/931793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could not able to find the way to calculate the mid-point of the line geometry in the SDE database where the geometries are stored in SDE.ST_GEOMETRY object.&lt;/P&gt;&lt;P&gt;There needs to be a function in ST_GEOMETRY object to create a mid point of a line and polyline.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently the midpoint calculating is possible in ArcGIS Geoprocessing tool. The similar function should be made available in SDE.ST_Geometry functions (&lt;A class="link-titled" href="https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/a-quick-tour-of-sql-functions-used-with-st-geometry.htm" title="https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/a-quick-tour-of-sql-functions-used-with-st-geometry.htm"&gt;SQL functions used with ST_Geometry—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;) which helps in processing the data within the database server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Dec 2019 15:16:22 GMT</pubDate>
    <dc:creator>AshokVanam1</dc:creator>
    <dc:date>2019-12-07T15:16:22Z</dc:date>
    <item>
      <title>Mid Point function in SDE.ST_GEOMETRY</title>
      <link>https://community.esri.com/t5/developers-ideas/mid-point-function-in-sde-st-geometry/idi-p/931793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could not able to find the way to calculate the mid-point of the line geometry in the SDE database where the geometries are stored in SDE.ST_GEOMETRY object.&lt;/P&gt;&lt;P&gt;There needs to be a function in ST_GEOMETRY object to create a mid point of a line and polyline.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently the midpoint calculating is possible in ArcGIS Geoprocessing tool. The similar function should be made available in SDE.ST_Geometry functions (&lt;A class="link-titled" href="https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/a-quick-tour-of-sql-functions-used-with-st-geometry.htm" title="https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/a-quick-tour-of-sql-functions-used-with-st-geometry.htm"&gt;SQL functions used with ST_Geometry—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;) which helps in processing the data within the database server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Dec 2019 15:16:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/mid-point-function-in-sde-st-geometry/idi-p/931793</guid>
      <dc:creator>AshokVanam1</dc:creator>
      <dc:date>2019-12-07T15:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Mid Point function in SDE.ST_GEOMETRY</title>
      <link>https://community.esri.com/t5/developers-ideas/mid-point-function-in-sde-st-geometry/idc-p/931794#M314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Work around solution to achieve this is to use Oracle Spatial function as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create or replace function get_line_midpoint&lt;BR /&gt; (line_in IN sde.st_geometry)&lt;BR /&gt; -- RETURN sde.st_geometry&lt;BR /&gt; RETURN VARCHAR2&lt;BR /&gt;IS &lt;BR /&gt;wkt_geometry clob;&lt;BR /&gt;ora_geometry sdo_geometry;&lt;BR /&gt;mid_x number(10,6);&lt;BR /&gt;mid_y number(10,6);&lt;BR /&gt;mid_point_geom sde.st_geometry;&lt;BR /&gt;BEGIN&lt;/P&gt;&lt;P&gt;SELECT sde.ST_AsText(line_in) INTO wkt_geometry FROM DUAL;&lt;BR /&gt;ora_geometry := SDO_UTIL.FROM_WKTGEOMETRY(wkt_geometry);&lt;/P&gt;&lt;P&gt;--mid_x:= sdo_cs.transform(SDO_LRS.CONVERT_TO_STD_GEOM(SDO_LRS.LOCATE_PT(SDO_LRS.CONVERT_TO_LRS_GEOM(ora_geometry, 3), SDO_GEOM.SDO_LENGTH(ora_geometry,3)/2)),8307).SDO_POINT.X;&lt;BR /&gt;mid_x:= SDO_LRS.CONVERT_TO_STD_GEOM(SDO_LRS.LOCATE_PT(SDO_LRS.CONVERT_TO_LRS_GEOM(ora_geometry, 3), SDO_GEOM.SDO_LENGTH(ora_geometry,3)/2)).SDO_POINT.X;&lt;/P&gt;&lt;P&gt;--mid_y:= sdo_cs.transform(SDO_LRS.CONVERT_TO_STD_GEOM(SDO_LRS.LOCATE_PT(SDO_LRS.CONVERT_TO_LRS_GEOM(ora_geometry, 3), SDO_GEOM.SDO_LENGTH(ora_geometry,3)/2)),8307).SDO_POINT.Y;&lt;BR /&gt;mid_y:= SDO_LRS.CONVERT_TO_STD_GEOM(SDO_LRS.LOCATE_PT(SDO_LRS.CONVERT_TO_LRS_GEOM(ora_geometry, 3), SDO_GEOM.SDO_LENGTH(ora_geometry,3)/2)).SDO_POINT.Y;&lt;/P&gt;&lt;P&gt;ora_geometry := SDO_UTIL.FROM_WKTGEOMETRY('point ('|| mid_x || ' ' || mid_y ||')');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return 'point ('|| mid_x || ' ' || mid_y ||')';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EXCEPTION&lt;BR /&gt;WHEN OTHERS THEN&lt;BR /&gt; raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);&lt;BR /&gt;END;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2019 13:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/mid-point-function-in-sde-st-geometry/idc-p/931794#M314</guid>
      <dc:creator>AshokVanam1</dc:creator>
      <dc:date>2019-12-19T13:12:57Z</dc:date>
    </item>
  </channel>
</rss>

