<?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 Need to test whether ST_GEOMETRY is working properly on database server. in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/need-to-test-whether-st-geometry-is-working/m-p/222191#M12605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kudos to ESRI for the look of the new pages.&amp;nbsp; Everything looks new and shiny.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to test if the configuration for ST_GEOMETRY on our server is working correctly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I test this example (see link)from the ESRI documentation. it works correctly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try a very similar query of my own the query never completes and if I cancel it leaves an external process on the server that takes more and more memory until the DBA has to kill it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) How can we verify st_geometry configuration works correctly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Is my query failing because of invalid syntax?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the link to ESRI documentation with query that&amp;nbsp; works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_java_help/index.html#/ST_Overlaps/00920000132m000000/"&gt;http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_java_help/index.html#/ST_Overlaps/00920000132m000000/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT hs.FULLNAME place, sa.name state&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FROM COM_GIS.tl_2009_pointlm hs, COM_GIS.TL_2009_US_STATE sa &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WHERE sa.stusps ='DC' and sde.st_overlaps(sde.st_buffer(hs.shape,.01), sa.shape) = 1;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Apr 2010 20:03:39 GMT</pubDate>
    <dc:creator>OvidioRivero</dc:creator>
    <dc:date>2010-04-28T20:03:39Z</dc:date>
    <item>
      <title>Need to test whether ST_GEOMETRY is working properly on database server.</title>
      <link>https://community.esri.com/t5/data-management-questions/need-to-test-whether-st-geometry-is-working/m-p/222191#M12605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kudos to ESRI for the look of the new pages.&amp;nbsp; Everything looks new and shiny.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to test if the configuration for ST_GEOMETRY on our server is working correctly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I test this example (see link)from the ESRI documentation. it works correctly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try a very similar query of my own the query never completes and if I cancel it leaves an external process on the server that takes more and more memory until the DBA has to kill it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) How can we verify st_geometry configuration works correctly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Is my query failing because of invalid syntax?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the link to ESRI documentation with query that&amp;nbsp; works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_java_help/index.html#/ST_Overlaps/00920000132m000000/"&gt;http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_java_help/index.html#/ST_Overlaps/00920000132m000000/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT hs.FULLNAME place, sa.name state&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FROM COM_GIS.tl_2009_pointlm hs, COM_GIS.TL_2009_US_STATE sa &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WHERE sa.stusps ='DC' and sde.st_overlaps(sde.st_buffer(hs.shape,.01), sa.shape) = 1;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Apr 2010 20:03:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-to-test-whether-st-geometry-is-working/m-p/222191#M12605</guid>
      <dc:creator>OvidioRivero</dc:creator>
      <dc:date>2010-04-28T20:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need to test whether ST_GEOMETRY is working properly on database server.</title>
      <link>https://community.esri.com/t5/data-management-questions/need-to-test-whether-st-geometry-is-working/m-p/222192#M12606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;as SDE on sqlplus:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT sde.st_astext(shape) shape_text FROM &amp;lt;table_name&amp;gt;;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 17:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-to-test-whether-st-geometry-is-working/m-p/222192#M12606</guid>
      <dc:creator>AlvaroMoreno</dc:creator>
      <dc:date>2010-08-05T17:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need to test whether ST_GEOMETRY is working properly on database server.</title>
      <link>https://community.esri.com/t5/data-management-questions/need-to-test-whether-st-geometry-is-working/m-p/222193#M12607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a sense everything is working correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's your query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT hs.FULLNAME place, sa.name state&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FROM COM_GIS.tl_2009_pointlm hs, COM_GIS.TL_2009_US_STATE sa &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WHERE sa.stusps ='DC' and sde.st_overlaps(sde.st_buffer(hs.shape,.01), sa.shape) = 1; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First you need to understand what your asking the operators and optimizer to do with your query...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You have two tables in your query tl_2009_pointlm (aliased hs) and tl_2009_us_state (aliased sa). You've set a predicate filter sa.stusps to return all tl_2009_us_state objects that equal DC (let's assume that's just one object).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That individual object is passed to the st_overlaps filter, sa.shape.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The st_overlaps operator can use the spatial index of the table in the first position, but you don't have a table in the first position. You have a collection of buffered hs.shape objects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; sde.st_overlaps(sde.st_buffer(hs.shape,.01), sa.shape) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You've forced the optimizer to first buffer (st_buffer) each object in the tl_2009_pointlm table (that could be thousands or millions of points - only you know the data). As each of those objects are buffered, they are next tested with the input sa.shape for st_overlaps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, do you understand the definition of st_overlaps?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ST_Overlaps&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ST_Overlaps compares two geometries of the same dimension and returns 1 or t (TRUE) if their intersection set results in a geometry different from both but of the same dimension.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ST_Overlaps returns 1 or t (TRUE) only for geometries of the same dimension and only when their intersection set results in a geometry of the same dimension. In other words, if the intersection of two ST_Polygons results in an ST_Polygon, overlap returns 1 or t (TRUE).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Therefore, when you buffer hs.shape does the output buffered object when overlapped with the sa.shape (DC) create a geometry that is different then both input geometries?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may want to use st_intersects if your objective is to return all the hs.shapes that intersect sa.shape. That's only a suggestion not knowing what your true objective is...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 20:11:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-to-test-whether-st-geometry-is-working/m-p/222193#M12607</guid>
      <dc:creator>TomBrown</dc:creator>
      <dc:date>2010-08-05T20:11:08Z</dc:date>
    </item>
  </channel>
</rss>

