Commit graph

268 commits

Author SHA1 Message Date
Paul Ramsey 8cabdcf81f 1.5 astyle pass
git-svn-id: http://svn.osgeo.org/postgis/trunk@5181 b70326c6-7e19-0410-871a-916f4a2858ee
2010-02-01 17:35:55 +00:00
Paul Ramsey 2bfaa2112f Keep floats out of registers for spheroid calculation. Fixes odd bug in OS/X gcc 4.1. Could probably be narrowed to only use flag on affected platform. (#395)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5180 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-29 21:24:24 +00:00
Paul Ramsey 3c9467dda4 Extra debugging information in spheroid area calculation.
git-svn-id: http://svn.osgeo.org/postgis/trunk@5178 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-29 18:00:16 +00:00
Paul Ramsey d061e19bf1 Make area unit tests actually test against known good values
git-svn-id: http://svn.osgeo.org/postgis/trunk@5177 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-28 17:42:52 +00:00
Paul Ramsey ea8d4c5585 Remove warning from lwline
git-svn-id: http://svn.osgeo.org/postgis/trunk@5170 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-26 20:20:47 +00:00
Paul Ramsey f0894275df Make ST_AddMeasure handle multilinestrings as well as linestrings.
git-svn-id: http://svn.osgeo.org/postgis/trunk@5168 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-26 18:56:22 +00:00
Paul Ramsey 7b65335f33 Add ST_AddMeasure and associated documentations (#390)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5162 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-25 21:03:42 +00:00
Paul Ramsey 721f1bafc2 Short circuit on distance tests: only do full spheroidal calculation where the distance is near or greater than the tolerance. This will make large st_dwithin() radius searches much faster since points that are well within the radius will not have their full geodetic calculation run, only those that are close to the radius boundary.
git-svn-id: http://svn.osgeo.org/postgis/trunk@5133 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-15 18:41:41 +00:00
Olivier Courtin 3883f211de Fix undefined vars in LWDEBUGF (#383)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5124 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-14 14:45:06 +00:00
Paul Ramsey e003325935 Fixed up de-serialization routines to avoid *geoms = malloc(0) cases which were causing free to fail later on down the line (#370)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5099 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-04 17:55:14 +00:00
Paul Ramsey 473ccf0f37 Make lwcollection_extract slightly more empty-intelligent
git-svn-id: http://svn.osgeo.org/postgis/trunk@5092 b70326c6-7e19-0410-871a-916f4a2858ee
2010-01-04 00:31:52 +00:00
Paul Ramsey a7f032948f CFLAGS=-pedantic pass over the codebase and warnings reduced
git-svn-id: http://svn.osgeo.org/postgis/trunk@5039 b70326c6-7e19-0410-871a-916f4a2858ee
2009-12-20 17:42:44 +00:00
Paul Ramsey f159b63673 Quiet solaris warnings
git-svn-id: http://svn.osgeo.org/postgis/trunk@5012 b70326c6-7e19-0410-871a-916f4a2858ee
2009-12-16 17:00:26 +00:00
Paul Ramsey cd73095c21 Fix up boundary condition in node interaction test.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4949 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-30 22:08:12 +00:00
Paul Ramsey a6c08ab192 Add an internal geometry tree for use in a native prepared geometry scheme for fast intersection tests.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4948 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-30 20:52:16 +00:00
Paul Ramsey b3f7f5ad5c Add svn:keywords to everyone
git-svn-id: http://svn.osgeo.org/postgis/trunk@4947 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-30 20:50:57 +00:00
Paul Ramsey 1d3a5616a3 Add newlines at file ends to silence warnings
git-svn-id: http://svn.osgeo.org/postgis/trunk@4913 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-27 17:50:24 +00:00
Mark Cave-Ayland d75548ebbb Fix #316: IsValid? called on invalid 3d object leads to crash. Because of the way the parser works, not all tuples can hold a valid parse position; hence when trying to display the error message, the parser would crash. The solution I went for here was to alter pop() so that "counting tuples" always hold a valid parse position, and then re-write the various check functions to ensure that they only display parse errors with details from the next "counting tuple" higher up in the stack.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4905 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-26 17:55:49 +00:00
Paul Ramsey 6700d1da91 Merge Nicklas Aven's distance spike into trunk. (#63, #231)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4894 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-25 19:15:57 +00:00
Paul Ramsey c6042246ec Move utility functions only used in cunit tests to the cunit code.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4880 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-22 04:56:19 +00:00
Paul Ramsey 68c55afc7e Replace pow(,2.0) with POW2 macro.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4879 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-22 04:28:01 +00:00
Paul Ramsey 0ed71c1737 Move from pass-by-value to pass-by-const-pointer. What can I say, I have no control over myself.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4877 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-21 06:08:40 +00:00
Paul Ramsey 74dbaa2429 Fix graxing case and improve co-linear handling with help from Nicklas Aven (#314)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4872 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-20 18:36:38 +00:00
Paul Ramsey 51be358f55 Handle the case where the stabline and a polygon edge are co-linear in point-in-polygon test.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4865 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-19 20:23:29 +00:00
Paul Ramsey 02ab6e17d5 Fix a double-free in the unit test for collection extract.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4850 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-17 22:29:40 +00:00
Paul Ramsey b3d2b3c9f9 Implement ST_CollectionExtract() to pull specific homogeneous collections out of heterogeneous collections. Regressions and documentation included. (#218)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4847 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-17 20:03:50 +00:00
Paul Ramsey 43a8513e27 Update behavior of lwgeom_same to match "orderingequals" semantics (#289)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4789 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-11 19:57:24 +00:00
Paul Ramsey 8d538ca180 Slightly loosen equality tolerance check for point in cone... does this fix cunit regressions?
git-svn-id: http://svn.osgeo.org/postgis/trunk@4788 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-11 19:35:20 +00:00
Paul Ramsey 6adec1b2be Simplify code and improve consistency of linecrossing results (#272)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4786 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-11 19:02:19 +00:00
Paul Ramsey 2d305b1795 Apply handling for EMPTY geometries to all geography functions per the DevWikiEmptyGeometry page.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4778 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-10 19:30:43 +00:00
Paul Ramsey 64b981e012 Fix for point-on-vertex case of st_covers (#271)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4761 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-07 00:12:56 +00:00
Olivier Courtin 4d138982f2 revert wrong commit (r4741) on wktparse.lex file
git-svn-id: http://svn.osgeo.org/postgis/trunk@4742 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-04 21:19:59 +00:00
Olivier Courtin 8d09ad000f Allow a double to not have digit after dot (related to #175). Update unit test case
git-svn-id: http://svn.osgeo.org/postgis/trunk@4741 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-04 21:10:40 +00:00
Paul Ramsey ac336483d6 Fix for #175, numbers with a terminal decimal won't parse.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4739 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-04 20:35:29 +00:00
Paul Ramsey e0381459b7 Remove unit test failure cases in 32-bit architectures. Now have to test correctness
of algorithms on test data in 64-bit environment.


git-svn-id: http://svn.osgeo.org/postgis/trunk@4732 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-04 00:13:04 +00:00
Paul Ramsey 9cddf4d6b9 File headers and property setting.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4729 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-03 21:24:53 +00:00
Paul Ramsey 9742ff9fbc Re-enable other geodetic unit tests and remove Java code block.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4720 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-03 02:58:03 +00:00
Paul Ramsey fba1c9c339 First cut of ST_Area(geography) on spheroid. Currently not default, use ST_Area(geog, true) to enable it. Beware of limitations over poles and eequator.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4719 b70326c6-7e19-0410-871a-916f4a2858ee
2009-11-03 00:36:02 +00:00
Paul Ramsey 6dd39806d5 Add ST_Length() implementation on spheroid and rationalize the sphere/spheroid implementations into
a smaller shared set of functions.


git-svn-id: http://svn.osgeo.org/postgis/trunk@4710 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-31 00:01:45 +00:00
Paul Ramsey 260b853a58 Add in spheroid calculations for ST_Distance and ST_DWithin.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4709 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-30 20:45:50 +00:00
Paul Ramsey 33861fea7d Minor changes for numerical stability. Remove logging.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4702 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-29 19:53:53 +00:00
Paul Ramsey ac8f490ddb Spheroid distance calculation between points added.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4700 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-29 19:24:06 +00:00
Olivier Courtin 0365190e5a Add ptarray_merge function
git-svn-id: http://svn.osgeo.org/postgis/trunk@4679 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-24 16:35:31 +00:00
Olivier Courtin f97acc13d3 Add ptarray_isclosed3d function
git-svn-id: http://svn.osgeo.org/postgis/trunk@4670 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-22 14:06:45 +00:00
Paul Ramsey 38adeece13 ST_Length(geography) per #266
git-svn-id: http://svn.osgeo.org/postgis/trunk@4662 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-18 04:19:04 +00:00
Mark Cave-Ayland 7dea8a5282 Update the TYPMOD_SET_* macros in the same way as for the FLAGS_SET_* macros earlier, so that they actually change the variable they reference.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4654 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-15 17:50:14 +00:00
Mark Cave-Ayland 9ffba1ed15 Alter the FLAGS_SET_* macros so that they actually update the specified flag variable, rather than just returning the new value of the flag variable.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4651 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-15 15:35:45 +00:00
Paul Ramsey 6839e6d5bc Much better fix for NaN area problem.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4647 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-13 19:50:45 +00:00
Paul Ramsey 69f3fb98d7 HAck fix for NaN areas.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4646 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-13 19:39:19 +00:00
Paul Ramsey c446e4711d Don't copy bboxes from lwgeom to gserialized when working with geodetics. (#263)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4640 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-11 02:03:13 +00:00