Opened 9 years ago
Closed 9 years ago
#3521 closed defect (invalid)
Wrong result of <select distinct geometry from XXX>
Reported by: | yuanrui1987 | Owned by: | pramsey |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.2.2 |
Component: | postgis | Version: | 1.5.X |
Keywords: | Cc: |
Description
Hi,
Sorry to bother. I have encountered the following problem, please help me.
I have one table, and its name is <temp_union_test>, the column of geometry is <the_geom>. there are two geometries, and they have the same bounding box. when I execute < select distinct the_geom from temp_union_test >, there is only one row returned, but actually, the two geometries is totally different. I have tried this execution on PostGIS 1.5 and PostGIS 2.0, the results is always the same.
Would you help me to solve this problem? If you have any concern about it, I would be very appreciate it. Thank you.
Attachments (1)
Change History (2)
by , 9 years ago
Attachment: | union_test_table.zip added |
---|
comment:1 by , 9 years ago
Milestone: | → PostGIS 2.2.2 |
---|---|
Resolution: | → invalid |
Status: | new → closed |
This is not a bug, but by design. When you use DISTINCT it uses the = operator which is tied to bounding box equality not geometry equality.
You could group by or distinct on geom::text to get what you want.
Anyrate please ask for help on our mailing list, not our bug tracker.
The two geometries