IBM Support

JR29301: ST_DIFFERENCE APPEARS TO MISS REMOVING A VOID IN THE MIDDLE OF A POLYGON, WHEN COVERED BY THE SECOND POLYGON.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • This is regards to DB2 spatial extender on LUW - version 8.2
    and/or 9.1.
    The use of ST_Difference with this data is basically a square
    donut and
    is giving the wrong result.  The first polygon is the donut
    itself and
    the 2nd polygon is the 'hole' of the donut.
    
    ST_Difference appears to miss removing a void in the middle of a
    polygon, when covered by the second polygon.
    
    '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))'
     'polygon ((1.5 1.5, 1.5 2.5, 2.5 2.5, 2.5 1.5, 1.5 1.5))'
    
    Should return first polygon again
    
    '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))'
    
    Returns only the outer polygon
    
    'polygon ((1 1, 1 3, 3 3, 3 1, 1 1))?
    
    ST_Difference takes two geometries of the same dimension as
    input and
    returns that portion of the first geometry that is not
    intersected by
    the second geometry.
    
    With the case above one should return the geometry with the hole
    in it.
    

Local fix

Problem summary

  • Users affected: All Spatial Extender
    
    Problem description:
    The ST_Difference spatial function returns an incorrect geometry
    in some cases.
    
    ST_Difference takes two geometries of the same dimension as
    input and returns that portion of the first geometry that is not
    intersected by the second geometry.
    
    This is an example of the failing case with a "square" donut:
    The first polygon is the donut itself and
    the 2nd polygon is the 'hole' of the donut.
    
    ST_Difference misses removing a void in the middle of a
    polygon, when covered by the second polygon.
    
    '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))'
    'polygon ((1.5 1.5, 1.5 2.5, 2.5 2.5, 2.5 1.5, 1.5 1.5))'
    
    Should return first polygon again
    
    '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))'
    
    Returns only the outer polygon
    'polygon ((1 1, 1 3, 3 3, 3 1, 1 1))
    

Problem conclusion

  • Recommendation: upgrade to DB2 V9.1 FP6 or V9.5 FP2.
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR29301

  • Reported component name

    SPATIAL EXT LIN

  • Reported component ID

    5648D6103

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-05-16

  • Closed date

    2009-10-12

  • Last modified date

    2009-10-12

  • APAR is sysrouted FROM one or more of the following:

    JR29299

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    SPATIAL EXT LIN

  • Fixed component ID

    5648D6103

Applicable component levels

  • R910 PSY

       UP

  • R950 PSY

       UP

[{"Business Unit":{"code":"BU050","label":"BU NOT IDENTIFIED"},"Product":{"code":"SSDP5R","label":"InfoSphere Replication Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"950","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
12 October 2009