Opened 15 years ago

Closed 15 years ago

#177 closed defect (invalid)

geometryfromtext precision

Reported by: danieldegasperi Owned by: pramsey
Priority: medium Milestone:
Component: postgis Version:
Keywords: Cc:

Description

Hi,

the following two geometries touch in binary format, but not if previously converted to text:

SELECT st_touches('0105000020E86400000100000001020000000A00000008D7A370B5AE234151B81E95A0B35341D1CCCCCCC5AE23410BD7A3A0A0B353412F3333B30EAF234114AE47419EB353419199991941AF2341000000509CB35341460AD72347AF234190C2F5489CB35341CFA3703D4CAF2341B81E858B9CB3534187EB51B84FAF2341285C8F629DB35341A6703D0A52AF234114AE47419EB35341E951B81E54AF234153B81E15A0B35341C01E85EB59AF23415B8FC2E5A6B35341',
'0105000020E864000003000000010200000003000000CD0668C2CAAE2341A0F9565471B35341305C8F42C3AE2341FFFFFF1F83B3534108D7A370B5AE234151B81E95A0B35341010200000003000000E8DA8457D3AE23418F37C0555DB35341AF1E85EBCCAE23413E0AD7336CB35341CD0668C2CAAE2341A0F9565471B35341010200000004000000285C8FC2D8AE234149E17A144FB35341A947E1FAD8AE234151B81E8550B3534157B81E05D4AE23413D0AD7C35BB35341E8DA8457D3AE23418F37C0555DB35341');

— OK

SELECT st_touches(geometryfromtext(asewkt('0105000020E86400000100000001020000000A00000008D7A370B5AE234151B81E95A0B35341D1CCCCCCC5AE23410BD7A3A0A0B353412F3333B30EAF234114AE47419EB353419199991941AF2341000000509CB35341460AD72347AF234190C2F5489CB35341CFA3703D4CAF2341B81E858B9CB3534187EB51B84FAF2341285C8F629DB35341A6703D0A52AF234114AE47419EB35341E951B81E54AF234153B81E15A0B35341C01E85EB59AF23415B8FC2E5A6B35341')),
              '0105000020E864000003000000010200000003000000CD0668C2CAAE2341A0F9565471B35341305C8F42C3AE2341FFFFFF1F83B3534108D7A370B5AE234151B81E95A0B35341010200000003000000E8DA8457D3AE23418F37C0555DB35341AF1E85EBCCAE23413E0AD7336CB35341CD0668C2CAAE2341A0F9565471B35341010200000004000000285C8FC2D8AE234149E17A144FB35341A947E1FAD8AE234151B81E8550B3534157B81E05D4AE23413D0AD7C35BB35341E8DA8457D3AE23418F37C0555DB35341');

— NOT OK

Is this a bug? Or is the text representation not supposed to preserve precision?

Regards, Daniel

Change History (1)

comment:1 by pramsey, 15 years ago

Resolution: invalid
Status: newclosed

This is exactly the reason we moved from a text-based canonical representation to a binary one. Because the binary→text→binary circuit was causing occasional, very slight, coordinate drift. Just enough to change relationships like touching. So, no, this isn't a bug, it's computers.

Note: See TracTickets for help on using tickets.