laptop and a wrench

Bug

Utilizing the st_geometry SQL API functions of st_difference and st_intersection would return incorrect results, they have been altered to return correct results.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM044399
SubmittedApril 16, 2009
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.3
Version Fixed9.4
StatusFixed

Workaround

Fix precision when geometry is returned as TEXT. Example:sde=#select ST_ASTEXT(ST_DIFFERENCE(ST_GEOMETRY('polygon ((1 1, 1 3, 3 3, 3 1, 1 1), (1.5 1.5, 1.5 2.5, 2.5 2.5, 2.5 1.5, 1.5 1.5))', 0), ST_GEOMETRY('polygon ((1 1, 1 2, 2 2, 2 1, 1 1))', 0)));POLYGON (( 1 2, 1.50000000 2.00000000, 1.50000000 2.50000000, 2.50000000 2.50000000, 2.50000000 1.50000000, 2.00000000 1.50000000, 2 1, 3 1, 3 3, 1 3, 1 2))Above is the correct result. The result reported in the initial CR was incorrect. Expected (as reported in the CR): POLYGON (( 1 2, 1.5 2, 1.5 2.5, 2.5 2.5, 2.5 1.5, 2 1, 2 1, 3 1, 3 3, 1 3, 1 2))sde=#select ST_ASTEXT(ST_Intersection(ST_GEOMETRY('multipolygon (((1 1, 4 1, 4 4, 1 4, 1 1)),((5 1, 8 1, 8 4, 5 4, 5 1)))', 0), ST_GEOMETRY('multilinestring ((2 2, 3 3),(2 2.2, 3 3.2))', 0)));MULTILINESTRING (( 2 2, 3 3),( 2.00000000 2.20000000, 3.00000000 3.20000000))

Steps to Reproduce

Bug ID: NIM044399

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options