Commit graph

111 commits

Author SHA1 Message Date
Sandro Santilli 3ead9a536d Implement topology.ST_AddEdgeModFace. Includes regress test. [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7273 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-27 14:01:14 +00:00
Sandro Santilli 7e5e8423d8 ST_AddEdgeNewFaces: another test splitting a face with holes on both sides [RT-SIGTA].
git-svn-id: http://svn.osgeo.org/postgis/trunk@7270 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-27 09:51:18 +00:00
Sandro Santilli 567986bd5e topology.ST_AddEdgeNewFaces: do not needlessly replace face of holes found in a face splitted by the newly added edge. Regress test it. [RT-SIGTA].
git-svn-id: http://svn.osgeo.org/postgis/trunk@7269 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-27 09:34:18 +00:00
Sandro Santilli 84dc153361 Add an optional force_new parameter to topology.ST_AddFace to force creation of a new face when one already exists. Regress test and document. [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7268 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-27 08:34:23 +00:00
Sandro Santilli fe9e336ea9 Error handling refinements in topology.ST_AddEdgeNewFaces (#988)
Check for given edge having two distinct vertices before getting a new
edge id from sequence, and before testing it for crossing nodes (or it'd
give a confusing error message). Refine error message about no-segment
edges to not talk about nodes. [RT-SIGTA]

git-svn-id: http://svn.osgeo.org/postgis/trunk@7253 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-26 07:26:56 +00:00
Sandro Santilli 7eecd1dbef Allow dumping universal face edges with ST_GetFaceEdges. Do it in the correct order. Fixes bug #984. [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7236 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 14:47:00 +00:00
Sandro Santilli bc6bbb47b7 ST_GetFaceGeometry: throw SQL/MM exception when asked for the Universal Face geometry. Fixes bug #973 [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7234 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 13:49:18 +00:00
Sandro Santilli 8aaa246193 ST_AddEdgeNewFaces: don't get fooled by empty segments when computing azimuts [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7232 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 13:15:01 +00:00
Sandro Santilli 81e3f2c74c Fix a bogus test for ST_AddEdgeNewFaces (was missing to check informations about the newly added edge) -- [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7231 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 12:14:14 +00:00
Sandro Santilli 681dd7bf6c Add another (successful) test for ST_AddEdgeNewFaces when creating a new face in the universal face by closing a ring around an existing non-isolated edge [RT-SIGTA].
git-svn-id: http://svn.osgeo.org/postgis/trunk@7230 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 10:45:40 +00:00
Sandro Santilli f4b9367a55 Test ST_ChangeEdgeGeom with edge crossing
git-svn-id: http://svn.osgeo.org/postgis/trunk@7228 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 09:13:39 +00:00
Sandro Santilli 859f148607 ST_ChangeEdgeGeom: check existence of given edge, reduce scans used to check start/end point and simplify the code, regress test the fix. Fixes bug #979.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7227 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 08:45:55 +00:00
Sandro Santilli 5230cc400d Move tests for ST_ChangeEdgeGeom into a dedicated file. Prepared for ticket #979. [RT-SIGTA].
git-svn-id: http://svn.osgeo.org/postgis/trunk@7225 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 08:13:46 +00:00
Sandro Santilli 3f79bce079 Test ST_GetFaceGeometry behavior when given face_id 0 (Universal Face). See ticket #973.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7224 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 07:54:45 +00:00
Sandro Santilli 8f010b34df ST_AddIsoEdge: tell that a node is isolated by only looking at containing_face rather than recomputing it. Closes ticket #978. [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7223 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 07:04:43 +00:00
Sandro Santilli 966db07632 Do not let ST_AddIsoNode add non-isolated nodes. Allow specifying 0 as the isolated node face and check it is correct. If containing_face is given as null then compute it. Patch by Andrea Peri. [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7222 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 06:55:29 +00:00
Regina Obe 6161063032 Fix for #981 - using astext legacy function in tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@7221 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-24 06:44:34 +00:00
Sandro Santilli 7b3707ae9f Style-only change: tab to spaces in ST_AddIsoEdge, shorten name of test topology
git-svn-id: http://svn.osgeo.org/postgis/trunk@7214 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-23 13:30:36 +00:00
Sandro Santilli e87586fdb1 Fix test for ST_AddIsoEdge verifying "geometry intersects an edge" exception. Fix exception message raised when attempting to insert a closed edge. Update regress test accoringly.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7213 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-23 13:13:21 +00:00
Sandro Santilli c3ba1e62b5 ST_AddIsoEdge: set containing_face of nodes connected by the newly added edge to null as the nodes are not isolated anymore. Regress test it. Closes ticket #976.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7212 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-23 12:49:51 +00:00
Sandro Santilli f94c1a3de4 Put tests for ST_AddIsoEdge in their own file. Fix use of ! rather than "not" for negating booleans in pl/pgsql.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7211 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-23 12:33:12 +00:00
Sandro Santilli 5f0b055c01 Update load_topology.sql to properly set MBR field of faces.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7210 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-23 11:30:44 +00:00
Sandro Santilli 147e0c17b1 And fix expected test output from st_addedgenewfaces (dunno how I could commit such a partial change...)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7209 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-23 11:28:18 +00:00
Sandro Santilli 34a5213861 Oops, forgot to uncomment temporarely disabled lines
git-svn-id: http://svn.osgeo.org/postgis/trunk@7208 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-23 11:26:25 +00:00
Sandro Santilli df1f153e48 Test that topology.ST_AddEdgeNewFaces properly updates isolated edges contained in a newly created face [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7207 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-23 08:44:00 +00:00
Sandro Santilli c212408084 topology.AddEdge: make edge linking self-consistent (each added edge will form a proper loop)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7201 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-19 20:36:47 +00:00
Sandro Santilli 2c77789f2b topology.ST_AddEdgeNewFaces implementation and regression test [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7194 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-18 16:08:36 +00:00
Sandro Santilli b7f9b8fa59 topology.AddFace(): properly update left/right face for edges _contained_ in the newly registered face and containing_face for isolated nodes in it, refine documentation about it [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7192 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-18 13:59:03 +00:00
Sandro Santilli 906fd8cd0a topology.GetRingEdges() implementation and test. This is the first real user of next_left_edge/next_right_edge fields in the edge table. [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7185 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-18 08:58:34 +00:00
Sandro Santilli 672530be60 Fixed bug in sample topology load (face id sequence value) [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7167 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-17 07:33:55 +00:00
Sandro Santilli cbe81a3405 Fix a bug in the example topology data (related to next_left_edge) -- affected regress testing, also updated [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7146 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-16 11:01:22 +00:00
Sandro Santilli 6e3318a18c topology.ST_AddEdgeNewFaces : tabs to spaces, named arguments, code cleanups and improved checks, tests for invalid calls [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7134 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-12 16:14:53 +00:00
Sandro Santilli 0e69383d94 Don't miss to clean load_topology-4326.sql
git-svn-id: http://svn.osgeo.org/postgis/trunk@7133 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-12 10:23:24 +00:00
Sandro Santilli de679b25e7 Implement, document, and regress-test SQL/MM ST_NewEdgeHeal [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7118 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-09 15:16:30 +00:00
Sandro Santilli 80d2b7ce0a ST_ModEdgeHeal: move check for TopoGeometry after check for connected edges. Fixes bug #942 and regress-tests it [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7109 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-06 21:39:46 +00:00
Sandro Santilli 7b03175753 topology.ST_ModEdgeHeal: Check for edge existance before TopoGeometry definitions. Fixes bug #941 and regress-tests it.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7108 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-06 21:21:55 +00:00
Sandro Santilli 4b96edeb54 Closer-to-iso exceptions from ST_GetFaceEdges/ST_ModEdgeHeal [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7105 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-06 06:46:58 +00:00
Sandro Santilli 67bce71647 ST_ModEdgeHeal: update TopoGeom definitions, and test it [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7089 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-04 18:20:20 +00:00
Sandro Santilli ce9f044415 Test that healing of two edges is forbidden if any topogeom is defined by only one of them [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7088 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-04 18:20:11 +00:00
Sandro Santilli 5cc632dd81 Forbid healing edges if any feature is defined by only one of the two [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7087 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-04 18:20:01 +00:00
Sandro Santilli 9ca3b1669e Complete primitive (SQL/MM) portion of ST_ModEdgeHeal, regress test [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7086 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-04 18:19:51 +00:00
Sandro Santilli ece190863a Implement ST_GetFaceEdges (sql/mm topology function) [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7081 b70326c6-7e19-0410-871a-916f4a2858ee
2011-05-03 13:32:41 +00:00
Sandro Santilli cd37bf1577 Regress test for topology.polygonize(<toponame>)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7048 b70326c6-7e19-0410-871a-916f4a2858ee
2011-04-19 16:58:52 +00:00
Sandro Santilli e38fac3d06 Add support for a RUNTESTFLAGS variable so you can do something like: 'make check RUNTESTFLAGS=-v' and get the problems printed w/out having to look at logs.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7015 b70326c6-7e19-0410-871a-916f4a2858ee
2011-04-11 09:54:06 +00:00
Sandro Santilli 727cd3369c Use a 2d geometry for face mbr, even for 2.5d topologies. After all mbr is a rectangle (not cube) by definition (Minimum Bounding Rectangle) so we don't want to mess with poliedron or whatnot [see #103 for more infos about the can of worms..]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6995 b70326c6-7e19-0410-871a-916f4a2858ee
2011-04-02 12:27:13 +00:00
Sandro Santilli f69dd26749 Add support for creating topologies allowing 3d vertices on edges and nodes. Includes regress testing [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6991 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-31 09:35:11 +00:00
Sandro Santilli 83db921ad5 Add another test for topology.AddFace in presence of an open edge whose endpoints both intersect a polygon ring which does not cover it.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6987 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-29 13:57:01 +00:00
Sandro Santilli a209240f8d Fix #874 by getting back to ST_SharedPaths use. Might try to optimize again in the future, but correctness first! This commit also adds regression testing for the case [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6942 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-19 23:35:21 +00:00
Sandro Santilli bff7f6071f Ticket #849 by Andrea Peri: topology.GetFaceByPoint implementation and test
git-svn-id: http://svn.osgeo.org/postgis/trunk@6889 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-09 21:59:39 +00:00
Sandro Santilli e5ca72613d Ticket #856: topology.CopyTopology(text,text) implementation, test and documentation
git-svn-id: http://svn.osgeo.org/postgis/trunk@6888 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-09 19:18:45 +00:00