#2845 closed defect (fixed)
Bad geometry created from ST_AddPoint
Reported by: | mwtoews | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.7 |
Component: | postgis | Version: | 2.0.x |
Keywords: | history | Cc: |
Description
Found this bug here http://stackoverflow.com/q/24812031/327026
Simplified as:
drop table bug; create table bug(geom geometry(LineString)); insert into bug(geom) values('LINESTRING(0 0, 1 1)'); update bug set geom = ST_AddPoint(geom, 'POINT(3 3)'); select ST_Intersects(geom, box), ST_Intersects(geom::text::geometry, box) from bug, ( select 'POLYGON ((2 2, 2 4, 4 4, 4 2, 2 2))'::geometry AS box ) AS foo;
with nonsense results, which should both be TRUE:
st_intersects | st_intersects ---------------+--------------- f | t
Note that using ST_MakeLine in place of ST_AddPoint in the above update query has expected results.
Change History (3)
comment:1 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
Milestone: | → PostGIS 2.0.7 |
---|---|
Version: | 2.1.x → 2.0.x |
comment:3 by , 10 years ago
Keywords: | history added |
---|
Note:
See TracTickets
for help on using tickets.
Fixed in 2.0 at r12848, 2.1 at r12850, trunk at r12849