Commit graph

525 commits

Author SHA1 Message Date
Sandro Santilli 48b38aa5e0 Add --expect switch to save obtained output as expected
Will help generating testcases

git-svn-id: http://svn.osgeo.org/postgis/trunk@8863 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-18 10:17:17 +00:00
Sandro Santilli 2da836b781 Drop the support for multiple expected files (not needed anymore)
The support was also broken, btw...

git-svn-id: http://svn.osgeo.org/postgis/trunk@8862 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-18 10:17:12 +00:00
Sandro Santilli 7091a479fc Test roundtrip with a binary cursor for both geometry and geography
With this commit the binary.sql testcase doesn't test the actual
binary output anymore but rather uses canonical binary output to
copy objects to a temporary file, then uses canonical binary input
to read the objects again into a new table and then compares the
original and the final tables.

In order for this to work run_test was modified to pass a :tmpfile
variable to testcases. Next stop: typmod for canonical binary input.

See ticket #850 for more info

git-svn-id: http://svn.osgeo.org/postgis/trunk@8861 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-18 08:19:42 +00:00
Sandro Santilli ea3128b4ec Implement canonical input-output for geography (#850)
Note: canonical output is tested, input isn't.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8860 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 20:01:36 +00:00
Sandro Santilli b798e45d87 Test canonical binary output for geometry (#850)
NOTE: big-endian machines are expected to fail this new test
      please send your actual output for a fix

git-svn-id: http://svn.osgeo.org/postgis/trunk@8859 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 19:15:48 +00:00
Sandro Santilli 004771dcb7 Support alternate expected files
Useful to test WKB output on different byte-endian machines.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8858 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 19:15:41 +00:00
Sandro Santilli b190d81331 Support for binary output (#850)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8857 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 19:15:20 +00:00
Sandro Santilli 54b115e6b0 Override geometrytype for geography (#1450).
The testusite runs without problems so I didn't also add a
geometrytype(text) function [I want the implicit cast!]

git-svn-id: http://svn.osgeo.org/postgis/trunk@8856 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 18:04:58 +00:00
Sandro Santilli 3a61ab1f87 Run the testsuite again after upgrading (#1326)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8855 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 17:52:57 +00:00
Sandro Santilli f5cb231784 Reword loading of upgrade scripts
git-svn-id: http://svn.osgeo.org/postgis/trunk@8854 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 17:52:46 +00:00
Sandro Santilli 419470fc86 Enhance staged install to include raster, topology and all scripts
Add an --upgrade switch to regress/run_test in preparation of
regress testing upgrade scripts (#1326)

git-svn-id: http://svn.osgeo.org/postgis/trunk@8853 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 17:13:32 +00:00
Sandro Santilli f948a4a8f0 Snap output of test for #723 to a grid
The test was failing due to coordinate drifts on 32bit

git-svn-id: http://svn.osgeo.org/postgis/trunk@8850 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 21:13:08 +00:00
Sandro Santilli 58adce3839 Fix 2.5d split (#745)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8847 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 17:37:12 +00:00
Sandro Santilli a075c7eb3b Keep UTM zone numbers in range, regress-test _ST_BestSRID (#1234)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8846 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 17:00:50 +00:00
Sandro Santilli 5d014cb337 Add test for insertion into typmod-ed table (#1414)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8836 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 12:10:05 +00:00
Sandro Santilli ca21d39436 Fix WKB output for POINT EMPTY with SRID or higher dims (#1478)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8835 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 11:22:27 +00:00
Sandro Santilli 0ba1a97615 Add WKB round-trip test for TIN
git-svn-id: http://svn.osgeo.org/postgis/trunk@8834 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:34:30 +00:00
Sandro Santilli ae22d6192d Fix reading TRIANGLE EMPTY in WKB form (#1474)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8833 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:31:18 +00:00
Sandro Santilli 3aee7df080 Add POLYHEDRALSURFACE roundtrip WKB test
git-svn-id: http://svn.osgeo.org/postgis/trunk@8832 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:31:09 +00:00
Sandro Santilli 10732e13a9 Implement lwgeom_same for MULTICURVE and MULTISURFACE (#1475)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8831 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:24:54 +00:00
Sandro Santilli 615bdce18a Implement lwgeom_same for CURVEPOLYGON types (#1475)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8830 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:21:09 +00:00
Sandro Santilli fa2077921b Implement lwgeom_same for COMPOUNDCURVE (#1475)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8829 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:18:07 +00:00
Sandro Santilli 6e285b15a1 Implement lwgeom_same for circularstring (#1475)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8828 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:11:44 +00:00
Sandro Santilli 6b4c747328 A CURVEPOLY is also a collection. Fixes #1473.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8827 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 09:11:45 +00:00
Paul Ramsey cce54f7523 Add ST_InterpolatePoint, deprecate ST_Locate_Between_Measures and ST_Locate_Along_Measure. Document new functions. Alter regressions and docs to use AsText instead of AsEWKT.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8811 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-14 01:03:37 +00:00
Sandro Santilli e7aa8d0d16 Add test for creating tables with circularstring typmod (#1085)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8804 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-13 17:34:24 +00:00
Sandro Santilli 6c3c6a8f7b First draft of a test for typmod (#1085)
This version simply creates the tables and checks geometry_columns.
Should be enhanced to test effectiveness of constraints.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8803 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-13 17:33:26 +00:00
Sandro Santilli 51e6e8e15e Complete tests for higher coordinate dimensions (#1455)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8789 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-12 11:21:11 +00:00
Sandro Santilli 442a2c98e3 Fix bug in dimension computer for collection WKT.
The parser got confused by inner M letters.
This commit also improves speed early breaking the loop over WKT.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8788 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-12 11:21:06 +00:00
Sandro Santilli 6e1d73efb0 Add tests for higher coordinate dimensions (#1455)
GEOMETRYCOLLECTION still fails

git-svn-id: http://svn.osgeo.org/postgis/trunk@8787 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-12 11:20:59 +00:00
Sandro Santilli 11432aa902 Test roundtrip of WKT. Higher dimensions still needed (#1455)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8786 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-12 08:52:11 +00:00
Sandro Santilli 6b22793afc Allow higher dimensions in GeomFromWKB (#1452)
Includes regress test for WKB roundtrip
(failing as expected with point empty)

git-svn-id: http://svn.osgeo.org/postgis/trunk@8780 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-11 18:53:28 +00:00
Sandro Santilli 8c6afecd88 Fix bug in gbox_same -> lwgeom_same -> ST_OrderingEquals (#1454)
Adds regression test for lwgeom_same and ST_OrderingEquals

git-svn-id: http://svn.osgeo.org/postgis/trunk@8779 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-11 18:45:00 +00:00
Sandro Santilli 887793cead Fix EMPTY ~= EMPTY to return TRUE (#1453)
This also fixes ST_OrderingEquals for empty geometries and
adds the concept of NULL boxes to represent EMPTY boxes.

ST_Equals is still broken as it uses the overlap operator instead.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8778 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-11 17:18:27 +00:00
Sandro Santilli 63838db72e Drop geography-specific C-side of AsBinary function. Proxy to geometry.
See #288

git-svn-id: http://svn.osgeo.org/postgis/trunk@8772 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-11 14:46:13 +00:00
Sandro Santilli 9540a582f6 Add regress test for WKB (#1448) and enable the existing one for WKT
git-svn-id: http://svn.osgeo.org/postgis/trunk@8770 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-11 11:17:10 +00:00
Sandro Santilli d5c60e3097 Unleash SQL/MM WKT returned by ST_AsText (#287)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8766 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-11 10:34:41 +00:00
Sandro Santilli 92026a713b Use a standard lwcollection_allows_subtype function to guard against bad input.
Fixes #698 (and #1445 in a better way)

git-svn-id: http://svn.osgeo.org/postgis/trunk@8747 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-10 13:17:21 +00:00
Sandro Santilli 25c22d217e Check type of elements added to multi geometries. Fixes #1445.
Includes regress testing both at the liblwgeom and postgis levels.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8742 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-10 11:36:14 +00:00
Sandro Santilli 3c7f558165 Add "M" type modifiers on elements of GEOMETRYCOLLECTION
Reflects specs in doc/ZMgeoms.txt and satisfies the parser.
Closes ticket #724.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8741 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-10 10:06:11 +00:00
Sandro Santilli af8bb4eaa7 Change lwgeom_is_empty to return spatial emptiness (#671)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8725 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-09 18:01:15 +00:00
Sandro Santilli 965a39d011 Switch back ST_CollectionExtract to return EMPTY rather than NULL on no matches (#835)
This behavior seems closer to the one requested in original #457
testcase, and is still consistent. Is also closer to documentation.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8721 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-09 17:01:54 +00:00
Sandro Santilli b89eb41a1d Alwas return NULL on type miss from ST_CollectionExtract (#835)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8718 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-09 16:20:21 +00:00
Paul Ramsey 8c45923794 Move geojson test into geojson.sql file
git-svn-id: http://svn.osgeo.org/postgis/trunk@8692 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-07 00:47:36 +00:00
Paul Ramsey b47da47ea1 ST_GeomFromGeoJSON - Malformed GeoJSON causes SIGSEGV in postgres process (#1434)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8690 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-07 00:29:34 +00:00
Paul Ramsey c71f36af42 Move offset curve generation into liblwgeom with other geos functionality
git-svn-id: http://svn.osgeo.org/postgis/trunk@8689 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-06 21:39:50 +00:00
Paul Ramsey cbd71f7374 Change to GNU macro NAN. Still not feeling The Confidence.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8667 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-03 23:52:42 +00:00
Paul Ramsey f1ca2a8e8e Change units to radians and add some tests (#657 and #1305)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8655 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-03 19:21:32 +00:00
Regina Obe 4fdebd48d7 #722 more regress fixes for GeomFromText
git-svn-id: http://svn.osgeo.org/postgis/trunk@8646 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-02 00:31:55 +00:00
Regina Obe 613f4966ef #722: regress replace GeomFromText with ST_GeomFromText
git-svn-id: http://svn.osgeo.org/postgis/trunk@8645 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-02 00:25:46 +00:00