Skip to content

Commit

Permalink
Add tests for topology bug #1855
Browse files Browse the repository at this point in the history
Previous commits fixes #1855 too

git-svn-id: http://svn.osgeo.org/postgis/trunk@16038 b70326c6-7e19-0410-871a-916f4a2858ee
  • Loading branch information
strk committed Oct 22, 2017
1 parent 48fed81 commit bc530a5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
15 changes: 15 additions & 0 deletions topology/test/regress/topogeo_addlinestring.sql
Expand Up @@ -350,3 +350,18 @@ SELECT 't3838.L2', topology.TopoGeo_addLinestring('bug3838',
'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');

9 changes: 9 additions & 0 deletions topology/test/regress/topogeo_addlinestring_expected
Expand Up @@ -222,3 +222,12 @@ t3838.L2|8
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
15 changes: 15 additions & 0 deletions topology/test/regress/topogeo_addpolygon.sql
Expand Up @@ -111,3 +111,18 @@ SELECT check_changes();
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');
4 changes: 4 additions & 0 deletions topology/test/regress/topogeo_addpolygon_expected
Expand Up @@ -53,3 +53,7 @@ ex_hole_snap|13
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

0 comments on commit bc530a5

Please sign in to comment.