Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1647 closed defect (fixed)

CreateTopology vs toTopoGeom: different behavior on the use of tolerance

Reported by: lrssvt Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: topology Version: 2.0.x
Keywords: Cc:

Description

I have noticed a different behavior using the tolerance. If I set tolerance value to 1, in CreateTopology function get:

while, if I set the same tolerance to toTopoGeom function get:

Also, if I set tolerance value to 2 in CreateTopology I get this error:

ERROR: Invalid edge (no two distinct vertices exist)
SQL state: P0001
Context: PL/pgSQL function "topogeo_addlinestring" line 147 at assignment
SQL statement "INSERT INTO test_topo.relation(topogeo_id, layer_id, element_type, element_id) SELECT 1, 1, 2, topogeo_addLineString('test_topo', '01020000201555000003000000329ABD50D7F92041C6FE24DDB5AF014159102D22D7F92041DDB54250BBAF0141FC05F508D7F9204144A619EEC2AF0141'::geometry, 2);"
PL/pgSQL function "totopogeom" line 120 at EXECUTE statement

I did this test with the SQL script attached!

Attachments (3)

strkDemoTopo.sql (1.0 KB ) - added by lrssvt 13 years ago.
tolerancetoTopoGeom.png (3.2 KB ) - added by lrssvt 13 years ago.
toleranceCreateTopology.png (3.2 KB ) - added by lrssvt 13 years ago.

Download all attachments as: .zip

Change History (6)

by lrssvt, 13 years ago

Attachment: strkDemoTopo.sql added

by lrssvt, 13 years ago

Attachment: tolerancetoTopoGeom.png added

by lrssvt, 13 years ago

Attachment: toleranceCreateTopology.png added

comment:1 by strk, 13 years ago

Status: newassigned

Please file another bug for the "no two distinct vertices" exception and keep this one for the different behavior.

comment:2 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

Good catch, toTopoGeom was failing to use the tolerance argument. Fixed with r9404

in reply to:  2 comment:3 by lrssvt, 13 years ago

Replying to strk:

Good catch, toTopoGeom was failing to use the tolerance argument. Fixed with r9404

Good! it works!

Note: See TracTickets for help on using tickets.