'LINESTRING(622608 6554988, 622596 6554984)'
::geometry , 10);
SELECT 't3838.end', topology.DropTopology('bug3838');
+
+-- See https://trac.osgeo.org/postgis/ticket/1855
+-- Simplified case 1
+SELECT 't1855_1.start', topology.CreateTopology('bug1855') > 0;
+SELECT 't1855_1.0', topology.TopoGeo_addLinestring('bug1855',
+ 'LINESTRING(0 0, 10 0, 0 1)', 2);
+SELECT 't1855_1.end', topology.DropTopology('bug1855');
+-- Simplified case 2
+SELECT 't1855_2.start', topology.CreateTopology('bug1855') > 0;
+SELECT 't1855_2.0', topology.topogeo_AddLinestring('bug1855',
+ 'LINESTRING(0 0, 0 100)');
+SELECT 't1855_2.1', topology.topogeo_AddLinestring('bug1855',
+ 'LINESTRING(10 51, -100 50, 10 49)', 2);
+SELECT 't1855_2.end', topology.DropTopology('bug1855');
+
t3838.L2|9
t3838.L2|2
t3838.end|Topology 'bug3838' dropped
+t1855_1.start|t
+t1855_1.0|1
+t1855_1.end|Topology 'bug1855' dropped
+t1855_2.start|t
+t1855_2.0|1
+t1855_2.1|3
+t1855_2.1|5
+t1855_2.1|6
+t1855_2.end|Topology 'bug1855' dropped
DROP FUNCTION check_changes();
SELECT DropTopology('city_data');
+-- See https://trac.osgeo.org/postgis/ticket/1855
+-- Original submission (more simplifications are
+-- in topogeo_addlinestring.sql)
+-- Original submission
+SELECT 't1855_0.start', topology.CreateTopology('bug1855', 0, 0.00001) > 0;
+SELECT 't1855_0.0', topology.TopoGeo_addPolygon('bug1855',
+ 'POLYGON((76.26727 9.85751,76.29001 9.90026,
+ 76.29942 9.86257,76.26727 9.85751))'
+::geometry);
+SELECT 't1855_0.1', topology.TopoGeo_addPolygon('bug1855',
+'POLYGON((76.31988 9.89696,76.30482 9.88391,
+ 76.2941 9.88391,76.29409 9.88391,76.29409 9.88392,
+ 76.29001 9.90026,76.31988 9.89696))'
+::geometry);
+SELECT 't1855_0.end', topology.DropTopology('bug1855');
ex_hole_snap|14
ex_hole_snap|15
Topology 'city_data' dropped
+t1855_0.start|t
+t1855_0.0|1
+t1855_0.1|2
+t1855_0.end|Topology 'bug1855' dropped