Commit graph

382 commits

Author SHA1 Message Date
Sandro Santilli 508febfa2b Fix TopoGeometry -> Geometry conversion for hierarchically defined TopoGeometries in presence of multiple topologies. Take the chance so simplify a query. WARNING: This fix doesn't have an automated regression test.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6683 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-21 13:21:52 +00:00
Sandro Santilli 2db89579b8 Make the TopoElement domain stricter to forbid arrays with more than 2 elements and also checking the element type being in valid range [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6672 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-19 16:46:16 +00:00
Sandro Santilli d5a820bd90 Raise an exception if AddEdge is called on a topology which already defines faces other than the universe face (see #781)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6670 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-18 17:19:55 +00:00
Sandro Santilli fcc149ae96 ValidateTopology: have temporary table dropped on commit (#783). Thanks Andrea Peri [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6668 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-18 13:52:42 +00:00
Regina Obe 79943766a5 Fix #786 ST_MoveIsoNode gives ST_Intersects is not unique. Also change to use newer $$ quoting syntax.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6665 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-18 06:38:01 +00:00
Sandro Santilli 3c839c505c topology.AddNode: fix detection of edge crossing (#780) [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6659 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-17 22:35:50 +00:00
Sandro Santilli 608471f434 ValidateTopology: Use a temporary table to create face geometries only once. Huge speed boost for #772.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6658 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-17 21:32:11 +00:00
Sandro Santilli 434d0238fd ValidateTopology: Put some water on fire by avoiding a full cartesian product scan (#772). It's still too slow, but it is a step forward.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6657 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-17 21:03:36 +00:00
Sandro Santilli cb12e9e593 ST_DWithin already includes a bounding box check
git-svn-id: http://svn.osgeo.org/postgis/trunk@6656 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-17 19:58:49 +00:00
Sandro Santilli ff5382c294 topology.ValidateTopology: rewrite the edge crossing detection query. Fixes a false positive (#777) and unexpectedly a bunch of false negative in the legacy_invalid testcase (now properly checked visually). [RT-SIGTA].
git-svn-id: http://svn.osgeo.org/postgis/trunk@6650 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-17 09:04:18 +00:00
Sandro Santilli c4ac0d5a9b topology.AddEdge: correctly handle the case in which a newly added closed edge touches an existing closed edge with an endpoint over a non-endpoint [RT-SIGTA].
git-svn-id: http://svn.osgeo.org/postgis/trunk@6649 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-17 08:47:34 +00:00
Sandro Santilli d5c2ca585b topology.AddFace: raise another WARNING about next_left/right_face element of topology edges not being set as dictated by the model
git-svn-id: http://svn.osgeo.org/postgis/trunk@6648 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-17 08:47:24 +00:00
Sandro Santilli 826a31212e ValidateTopology: don't compute full intersection matrix to detect edge-node intersection. Use ST_DWithin instead. Use ST_DWithin for coincident nodes detection as well, so to be more consistent [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6646 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-16 21:42:05 +00:00
Sandro Santilli 9f80c1cc62 ValidateTopology: && operator is not enough to tell if two points are cohincident (it was at time of HWGEOM...) [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6645 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-16 21:29:30 +00:00
Regina Obe d754722106 #776: replace dump with ST_Dump in ST_CreateTopogeo
git-svn-id: http://svn.osgeo.org/postgis/trunk@6641 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-16 11:22:20 +00:00
Sandro Santilli 9f029df4a8 Drop unused domain TopoGeomElementArray. See #775
git-svn-id: http://svn.osgeo.org/postgis/trunk@6640 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-16 10:36:29 +00:00
Sandro Santilli a85b767ad7 topology.AddFace: group face boundary edge finding query results to avoid considering the _same_ edge multiple times. Can reduce execution time from _hours_ to _minutes_ [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6633 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-15 23:14:30 +00:00
Sandro Santilli d20207b6f3 topology.AddEdge: handle case of endpoint intersection between closed edges. Fixes #770. [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6626 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-14 16:40:01 +00:00
Regina Obe 8f573ca940 #764: Topology error using ST_AddIsoNode (now that raster has an ST_Intersects it is now more necessary to not rely on auto casts)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6593 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-11 09:12:54 +00:00
Regina Obe 3c14ce4eb1 #760: missed some
git-svn-id: http://svn.osgeo.org/postgis/trunk@6590 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-10 17:31:34 +00:00
Regina Obe 1b4bca68ca #760: replace deprecated function names with new names so all regress tests pass again. This should completely work now.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6589 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-10 17:27:22 +00:00
Regina Obe 82ff8a7756 Start replacing deprecated names with new names - still more to do
git-svn-id: http://svn.osgeo.org/postgis/trunk@6588 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-10 17:13:09 +00:00
Sandro Santilli f44d93b745 Enlarge the diagram image, by Andrea Peri (#750)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6579 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-07 10:48:11 +00:00
Sandro Santilli 3b1c9e47d7 Fix bug in topology.DropTopology getting confused in presence of multiple topologies [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6578 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-07 09:55:00 +00:00
Sandro Santilli a56cbf8a70 Add TopoElementArray_agg function, to help with TopoGeometry construction [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6577 b70326c6-7e19-0410-871a-916f4a2858ee
2011-01-07 09:54:49 +00:00
Sandro Santilli 8220dbff22 Default topology tolerance is 0, not -1
git-svn-id: http://svn.osgeo.org/postgis/trunk@6522 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-28 17:16:19 +00:00
Sandro Santilli c6d94cfa10 PG_CONFIG seems to be needed for PGXS
git-svn-id: http://svn.osgeo.org/postgis/trunk@6514 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-27 11:56:44 +00:00
Sandro Santilli 66cc45f8e2 Do not consider DEBUG and NOTICE mesages when running sqlmm regression tests. Should fix #734.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6512 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-27 11:05:24 +00:00
Sandro Santilli a5692b4caf Update with some integrations provided by Andrea Peri [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6497 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-24 10:22:45 +00:00
Sandro Santilli 2435869dee Other CREATEFUNCTION and _VOLATILE* gone (see #714)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6489 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-23 17:30:32 +00:00
Sandro Santilli f6a4bb85bf Stop relying on preprocessor for CREATEFUNCTION and _VOLATILE (see #714)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6486 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-23 14:19:33 +00:00
Sandro Santilli 5ced73be27 Make ST_GetFaceGeometry use ST_BuildArea rather than assuming first polygon coming out of Polygonize will be the correct one. Fixes ticket #726. Enables automated testing for it.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6484 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-23 12:49:01 +00:00
Sandro Santilli 348c017d0e Add test showing bug in st_getfacegeometry
git-svn-id: http://svn.osgeo.org/postgis/trunk@6483 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-23 12:28:11 +00:00
Sandro Santilli 9d2b1faeb4 Support faces with all edges on the same side, and test [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6474 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-22 18:45:07 +00:00
Sandro Santilli 42f41926b7 Implement topology.AddFace and add test
git-svn-id: http://svn.osgeo.org/postgis/trunk@6471 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-22 17:27:02 +00:00
Sandro Santilli 0f033d66fe Fix addEdge when both endpoints are shared with an existing edge (and test) [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6456 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-20 22:01:04 +00:00
Sandro Santilli 43cc5b5a2b Add regress testing for topology.AddEdge
git-svn-id: http://svn.osgeo.org/postgis/trunk@6435 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 17:56:56 +00:00
Sandro Santilli ae20e8786a Add a note about possible semantic change
git-svn-id: http://svn.osgeo.org/postgis/trunk@6432 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 17:19:07 +00:00
Sandro Santilli 4dcc6fc5df New topology.AddEdge function [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6431 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 17:16:00 +00:00
Sandro Santilli b7766a573d Use newer quoting paradigm ($$); use ST_Crosses when willing to check crossing, not just intersection...; add proper credits
git-svn-id: http://svn.osgeo.org/postgis/trunk@6428 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 16:16:41 +00:00
Sandro Santilli 13559b749e Add an inspection in the final node table
git-svn-id: http://svn.osgeo.org/postgis/trunk@6427 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 15:51:04 +00:00
Sandro Santilli 694dec36a3 Add test for topology.addNode
git-svn-id: http://svn.osgeo.org/postgis/trunk@6426 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 15:27:12 +00:00
Sandro Santilli 4b078f7c5a Avoid NOTICE messages while running topology tests, make results immune of the number of topologies ever created in the database (helps getting stable results when running the tests manually using run_test directly)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6425 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 15:17:57 +00:00
Sandro Santilli 578d0ac9a0 split load_topology in 3 steps: load of topology, creation of feature tables, query of feature tables. Adapt tests accordingly.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6423 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 07:52:06 +00:00
Sandro Santilli 05624d765d Install topology.sql in the same directory as other things postgis
git-svn-id: http://svn.osgeo.org/postgis/trunk@6406 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 18:29:29 +00:00
Sandro Santilli 89d8fb0289 Generate GNUMakefile, add a --with-topology switch to configure, enabling descending under topology/ dir
git-svn-id: http://svn.osgeo.org/postgis/trunk@6404 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 18:03:52 +00:00
Sandro Santilli 6fd43f6035 Add a check rule under topology/ [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6400 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 17:11:34 +00:00
Sandro Santilli 2592f840d3 Make sure predicate sql file is generated before use
git-svn-id: http://svn.osgeo.org/postgis/trunk@6399 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 17:06:12 +00:00
Sandro Santilli 01263e654d Add sqlmm automated test. Drop old rules [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6398 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 16:41:12 +00:00
Sandro Santilli c7117c9a02 automatize topology validity checking [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6397 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 16:24:01 +00:00
Sandro Santilli 6cec1b8e0c Start a proper 'make check' rule, using the testrunner in top dir's regress dir
git-svn-id: http://svn.osgeo.org/postgis/trunk@6396 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 16:04:05 +00:00
Sandro Santilli 7eee0aae59 Add new populate.sql file to host topology population routines. Properly encode dependencies.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6391 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 13:39:52 +00:00
Sandro Santilli 82943113aa Split sqlmm specific things into its own file
git-svn-id: http://svn.osgeo.org/postgis/trunk@6389 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 11:01:00 +00:00
Sandro Santilli de082e616d Work outside of transaction, to help upgrade/test cycles. Fix leftover from previous commit. [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6388 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 10:48:24 +00:00
Sandro Santilli 3daf93d2f5 Fix typo in TopoGeo_addLinestring description, add DEBUG lines [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@6387 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 10:44:37 +00:00
Sandro Santilli 8218075d32 Fix detection of non-existent schema in ST_CreateTopoGeo
git-svn-id: http://svn.osgeo.org/postgis/trunk@6386 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-15 10:08:31 +00:00
Sandro Santilli ccede85f76 Add comments on the 'edge' topology primitives view
git-svn-id: http://svn.osgeo.org/postgis/trunk@6345 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-13 10:49:18 +00:00
Sandro Santilli fa64621762 typo
git-svn-id: http://svn.osgeo.org/postgis/trunk@6344 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-13 09:51:30 +00:00
Sandro Santilli d383600a23 Do not force drop of pre-existing topology schema. Sounds dangerous when start using it for real.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6339 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-11 00:27:25 +00:00
Sandro Santilli 37d7438c8a Drop references to topology geometry tables in DropTopology (see #586)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5966 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-13 19:18:13 +00:00
Sandro Santilli aaa0ad8971 Add note about topology.sql expecting a postgis-enabled db
git-svn-id: http://svn.osgeo.org/postgis/trunk@5965 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-13 17:01:24 +00:00
Sandro Santilli f3634e60f4 PostgreSQL 9 support : don't use reserved 'table' keyword (see #585)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5964 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-13 16:59:21 +00:00
Sandro Santilli 3a102a5ec8 Make edge-edge relations clearer. Thanks to Peter Hopfgartner and to
Xfig developers for the wonderful experience of patching a diagram ! :)


git-svn-id: http://svn.osgeo.org/postgis/trunk@5893 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-03 12:31:41 +00:00
Sandro Santilli ac913341c7 Add 7.3+ CAST (wasn't needed up to 7.2, against which this topology implementation was coded)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5732 b70326c6-7e19-0410-871a-916f4a2858ee
2010-07-07 21:52:15 +00:00
Sandro Santilli 25c10402ef Remove spurious element (was hiding behind a fill)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5722 b70326c6-7e19-0410-871a-916f4a2858ee
2010-07-06 08:28:08 +00:00
Sandro Santilli d98e51793b Do not source psqlrc when doing tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@5717 b70326c6-7e19-0410-871a-916f4a2858ee
2010-06-30 16:14:03 +00:00
Sandro Santilli e2d33bcc46 More explicit cast from geometry to text (for quote_ident's sake) and an handling of unexistent topology. Tests run again with psql 8.3.9
git-svn-id: http://svn.osgeo.org/postgis/trunk@5716 b70326c6-7e19-0410-871a-916f4a2858ee
2010-06-30 16:10:54 +00:00
Sandro Santilli bacacf52bc Define the cross-pgsql macros that used to be in sqldefines.h (now lost) + use st_union rather than geomunion (now lost)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5715 b70326c6-7e19-0410-871a-916f4a2858ee
2010-06-30 15:52:02 +00:00
Sandro Santilli d30ca83a70 Fix loading of postgis.sql
git-svn-id: http://svn.osgeo.org/postgis/trunk@5714 b70326c6-7e19-0410-871a-916f4a2858ee
2010-06-30 15:51:17 +00:00
Paul Ramsey ddfe100a7c Change references from ./lwgeom to ./postgis
git-svn-id: http://svn.osgeo.org/postgis/trunk@3687 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-11 18:28:53 +00:00
Paul Ramsey cdfcc4e366 Propset Author Id Keyword Revision on all files.
git-svn-id: http://svn.osgeo.org/postgis/trunk@3639 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-04 00:28:37 +00:00
Mark Cave-Ayland b6e444e638 Change configure to check for the existence of the PGXS Makefile, even if pg_config can be found. This is become distributions such as Debian install pg_config as part of libpq-dev but this package doesn't contain the required Makefile. Per bug report from strk.
git-svn-id: http://svn.osgeo.org/postgis/trunk@3261 b70326c6-7e19-0410-871a-916f4a2858ee
2008-11-06 15:15:06 +00:00
Mark Cave-Ayland 4eec27c992 Allow Makefile substitutions for PGCONFIG which are required if pg_config is not located in the path. Note that as part of this fix, we now need to generate topology/Makefile using autoconf. Thanks to Jorgen Austvik for the report and partial patch.
git-svn-id: http://svn.osgeo.org/postgis/trunk@2885 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-28 10:03:31 +00:00
Mark Cave-Ayland 70609da272 Update topology/ directory to use the new PGXS build system.
git-svn-id: http://svn.osgeo.org/postgis/trunk@2779 b70326c6-7e19-0410-871a-916f4a2858ee
2008-05-22 14:31:02 +00:00
Sandro Santilli 17de7461ef removed duplicated function definition
git-svn-id: http://svn.osgeo.org/postgis/trunk@2469 b70326c6-7e19-0410-871a-916f4a2858ee
2006-09-06 11:16:59 +00:00
Sandro Santilli 13d7f31340 Added 'with oids' specification to create table (oids are used for the test).
'With oids' was available in postgresql 7.3.4 so we should not be highering
the requirements for topology. Suggestion from Alex Bodnaru.


git-svn-id: http://svn.osgeo.org/postgis/trunk@2363 b70326c6-7e19-0410-871a-916f4a2858ee
2006-05-22 12:10:58 +00:00
Sandro Santilli 36f7d35145 Applied cleanups by Alex Bodnaru
git-svn-id: http://svn.osgeo.org/postgis/trunk@2362 b70326c6-7e19-0410-871a-916f4a2858ee
2006-05-22 11:17:34 +00:00
Sandro Santilli 946649dc11 Initial work on ST_AddEdgeNewFaces
git-svn-id: http://svn.osgeo.org/postgis/trunk@2018 b70326c6-7e19-0410-871a-916f4a2858ee
2005-11-01 11:56:20 +00:00
Sandro Santilli e51b2fe6b6 Added ST_ModEdgesSplit function, cleaned up test files, added tests for
the new topology editing functions.


git-svn-id: http://svn.osgeo.org/postgis/trunk@1971 b70326c6-7e19-0410-871a-916f4a2858ee
2005-10-19 10:04:15 +00:00
Sandro Santilli 307df8801e Fixed ST_NewEdgesSplit function to return new Node id rather then text
git-svn-id: http://svn.osgeo.org/postgis/trunk@1970 b70326c6-7e19-0410-871a-916f4a2858ee
2005-10-18 16:39:15 +00:00
Sandro Santilli a7fcbf3910 Added SQL/MM functions ST_RemoveIsoEdge and ST_NewEdgesSplit.
The ST_NewEdgesSplit also updates the Relation table (out of SQL/MM specs).


git-svn-id: http://svn.osgeo.org/postgis/trunk@1969 b70326c6-7e19-0410-871a-916f4a2858ee
2005-10-18 15:31:26 +00:00
Sandro Santilli 2b5868ca90 Initial work on topology model support
git-svn-id: http://svn.osgeo.org/postgis/trunk@1964 b70326c6-7e19-0410-871a-916f4a2858ee
2005-10-13 16:21:49 +00:00