Commit graph

1179 commits

Author SHA1 Message Date
Paul Ramsey 2506552da8 Add more info to circtree structures
git-svn-id: http://svn.osgeo.org/postgis/trunk@12211 b70326c6-7e19-0410-871a-916f4a2858ee
2014-02-04 05:57:22 +00:00
Nicklas Avén eaf91d31db First varint cunit test
git-svn-id: http://svn.osgeo.org/postgis/trunk@12201 b70326c6-7e19-0410-871a-916f4a2858ee
2014-01-29 21:47:27 +00:00
Nicklas Avén f90f08ddd6 Remove flagging for first vertex and just substract with 0 instead
git-svn-id: http://svn.osgeo.org/postgis/trunk@12200 b70326c6-7e19-0410-871a-916f4a2858ee
2014-01-29 21:44:41 +00:00
Nicklas Avén 36c17d6fb1 Use signed instead of unsignet varint for ID and check for values out of varint range
git-svn-id: http://svn.osgeo.org/postgis/trunk@12199 b70326c6-7e19-0410-871a-916f4a2858ee
2014-01-29 21:32:08 +00:00
Paul Ramsey bf2901b473 #2622, Update links to PostGIS website in source file headers
git-svn-id: http://svn.osgeo.org/postgis/trunk@12198 b70326c6-7e19-0410-871a-916f4a2858ee
2014-01-29 17:49:35 +00:00
Nicklas Avén d57f3695e6 Fix two wrong behavior in TWKB with optional id and type in different situations
git-svn-id: http://svn.osgeo.org/postgis/trunk@12188 b70326c6-7e19-0410-871a-916f4a2858ee
2014-01-18 20:28:49 +00:00
Paul Ramsey b1a5f45f2f Remove warnings in llvm/clang
git-svn-id: http://svn.osgeo.org/postgis/trunk@12125 b70326c6-7e19-0410-871a-916f4a2858ee
2013-11-12 22:06:18 +00:00
Sandro Santilli 407b2d1cc7 Fix small memory leak in lwline_split_by_line (#2528)
Thanks Alessandro Furieri for the report and test

git-svn-id: http://svn.osgeo.org/postgis/trunk@12094 b70326c6-7e19-0410-871a-916f4a2858ee
2013-11-06 09:39:29 +00:00
Paul Ramsey 95f32e10b9 #2433, ST_ConcaveHull 2.1 regress failure compared to 2.0
git-svn-id: http://svn.osgeo.org/postgis/trunk@12049 b70326c6-7e19-0410-871a-916f4a2858ee
2013-10-19 04:24:54 +00:00
Paul Ramsey 047c30fc63 #2463, st_length on curve is on linearized geom
git-svn-id: http://svn.osgeo.org/postgis/trunk@12045 b70326c6-7e19-0410-871a-916f4a2858ee
2013-10-18 21:00:07 +00:00
Sandro Santilli 49e05caf04 Enhance error messages in lwgeom_intersection and lwgeom_normalize
git-svn-id: http://svn.osgeo.org/postgis/trunk@11931 b70326c6-7e19-0410-871a-916f4a2858ee
2013-09-06 16:46:30 +00:00
Nicklas Avén c4a5493f45 add support for ID up to int64
git-svn-id: http://svn.osgeo.org/postgis/trunk@11889 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-26 22:35:19 +00:00
Nicklas Avén 184636263c Remove homebrewed compression method. Don't add ID if not used.
git-svn-id: http://svn.osgeo.org/postgis/trunk@11878 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-26 18:58:28 +00:00
Nicklas Avén 3fa7a08cf9 Fix wrong size-calculation when mixed types in aggregated twkb
git-svn-id: http://svn.osgeo.org/postgis/trunk@11839 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-18 21:59:02 +00:00
Nicklas Avén 7d57f0b167 Add varInt encoding for twkb (seems to be the best option)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11813 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-17 23:23:47 +00:00
Nicklas Avén 933e40d722 fix back polyhedralsurface to distance calculations #2431 (trunk)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11808 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-16 18:49:31 +00:00
Sandro Santilli c86d9084bd Implement ST_ForceCurve (#2430)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11803 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-14 22:40:16 +00:00
Sandro Santilli 965a234144 lw_segment_side may return any negative number, not just -1 (#2420)
Adds other unit tests for line desegmentation excercising quadrant
computation.

git-svn-id: http://svn.osgeo.org/postgis/trunk@11801 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-14 07:37:23 +00:00
Sandro Santilli 711d56fe4e Fix computation of number of quadrants per arc (#2420)
Note: I had to change some tests that expected 3-quadrant curves
      to be accepted as curvey input to rely on round-trip instead

git-svn-id: http://svn.osgeo.org/postgis/trunk@11794 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-13 23:48:04 +00:00
Sandro Santilli 2cc422bb20 Pick curve control point farther than in the middle
Seems to get a good point when doing manual tests...

git-svn-id: http://svn.osgeo.org/postgis/trunk@11793 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-13 23:47:54 +00:00
Sandro Santilli 63dc80d4dc Make sure to retain first point of curves on linearization (#2427)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11790 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-13 22:54:21 +00:00
Sandro Santilli 6a21d5ece0 Fix short allocation of edge to curves store (#2425)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11789 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-13 07:27:23 +00:00
Sandro Santilli b4cb77f15a Add COMPOUNDCURVE in MULTICURVE support for ST_CurveToLine (#2424)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11784 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-13 06:51:12 +00:00
Sandro Santilli 8ccff1d3dd Require all arc edges to form the same angle (#2423)
Note: gives expected result for #183

git-svn-id: http://svn.osgeo.org/postgis/trunk@11778 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-12 18:11:36 +00:00
Sandro Santilli 77cbccefb4 Declare variables the proper C way
git-svn-id: http://svn.osgeo.org/postgis/trunk@11770 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-11 17:05:59 +00:00
Sandro Santilli 3b821c1aab Require at least 8 edges to define a full circle (#2420)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11769 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-11 15:55:50 +00:00
Sandro Santilli 180dfda357 Add cunit-level test for #2412
git-svn-id: http://svn.osgeo.org/postgis/trunk@11768 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-11 09:07:11 +00:00
Sandro Santilli f143b128d3 Fix ST_LineToCurve with input having less than 4 vertices (#2412)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11765 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-11 08:40:30 +00:00
Sandro Santilli 805fb4e986 Fix ST_Multi with COMPOUNDCURVE and CURVEPOLYGON types (#2415)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11754 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-09 06:59:55 +00:00
Regina Obe a049919b1b #2396: liblwgeom CUnit tests fail on big-endian architectures.
git-svn-id: http://svn.osgeo.org/postgis/trunk@11749 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-08 21:19:41 +00:00
Sandro Santilli 7ee5a3afe0 Fix segmentize of collinear curve (#2410)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11745 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-08 06:07:50 +00:00
Nicklas Avén 672dec8ee6 getting rid of some compiling warnings
git-svn-id: http://svn.osgeo.org/postgis/trunk@11739 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-06 17:09:15 +00:00
Nicklas Avén fe84191317 Initial commit of TWKB implimentation to trunk
git-svn-id: http://svn.osgeo.org/postgis/trunk@11736 b70326c6-7e19-0410-871a-916f4a2858ee
2013-08-04 21:27:27 +00:00
Sandro Santilli 5a8ee75ffe Fix the ST_MakeValid leak, keep it crash-free (#2307)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11636 b70326c6-7e19-0410-871a-916f4a2858ee
2013-07-05 10:40:48 +00:00
Sandro Santilli a381d036e5 Add cunit test for #2307
So now we have a "leak or crash" situation.

git-svn-id: http://svn.osgeo.org/postgis/trunk@11635 b70326c6-7e19-0410-871a-916f4a2858ee
2013-07-05 10:26:36 +00:00
Paul Ramsey 42b77c0b60 #2307, test and comment on free line
git-svn-id: http://svn.osgeo.org/postgis/trunk@11620 b70326c6-7e19-0410-871a-916f4a2858ee
2013-07-02 22:33:15 +00:00
Paul Ramsey 47ea3400cc #2351, st_distance between geographies wrong
git-svn-id: http://svn.osgeo.org/postgis/trunk@11535 b70326c6-7e19-0410-871a-916f4a2858ee
2013-06-07 17:39:43 +00:00
Paul Ramsey 88eec79212 #2307, ST_MakeValid outputs invalid geometries
git-svn-id: http://svn.osgeo.org/postgis/trunk@11525 b70326c6-7e19-0410-871a-916f4a2858ee
2013-06-05 18:11:58 +00:00
Sandro Santilli 7d7ea5caf5 Remove warnings from liblwgeom
These are mostly unused variables

git-svn-id: http://svn.osgeo.org/postgis/trunk@11511 b70326c6-7e19-0410-871a-916f4a2858ee
2013-06-03 08:26:51 +00:00
Sandro Santilli e84d935d96 Use finite() instead of isfinite()
The former is also already used under postgis/ so we already rely
on it. The latter is been reported to be unavailable on Solaris.

git-svn-id: http://svn.osgeo.org/postgis/trunk@11471 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-18 21:07:29 +00:00
Regina Obe c6c8cb8f3c #1898, #2322 move geos functions in lwtin.c to lwgeom_geos.c to prevent unhealthy dependency on geos (for loader tools and also image generator), roll back change to cunit for loader (the geos includes). bump up version number to beta2dev
git-svn-id: http://svn.osgeo.org/postgis/trunk@11438 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-12 02:27:58 +00:00
Olivier Courtin 629551694f cf #2318, add a optional additional version parameter in ST_ForceSFS, handle both 1.1 and 1.2. default is 1.1
git-svn-id: http://svn.osgeo.org/postgis/trunk@11409 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-10 17:17:18 +00:00
Olivier Courtin 782eaa752f output COLLECTION of Polygon for TIN and PolyhedralSurface, for ST_ForceSFS (instead of MultiPolygon). Thanks to Sandro for these input
git-svn-id: http://svn.osgeo.org/postgis/trunk@11402 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-10 11:40:50 +00:00
Sandro Santilli 3a2c4e25eb Fix more compiler warnings
There are still some that would be nice to fix, but it's mostly
the array subscript is above array bounds one

git-svn-id: http://svn.osgeo.org/postgis/trunk@11400 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-10 07:51:19 +00:00
Sandro Santilli 512eeff20d Fix implicit declaration of function 'tolower' warning
git-svn-id: http://svn.osgeo.org/postgis/trunk@11396 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-10 07:06:46 +00:00
Olivier Courtin 67fb27c034 Related to #2313
git-svn-id: http://svn.osgeo.org/postgis/trunk@11395 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-10 07:00:50 +00:00
Olivier Courtin 927028f23c Add SFCGAL support cf #2254. Include SFCGAL support, postgis backend handling (GEOS/SFCGAL). Regress tests, documentation prototypes and also additional force_sfs function.
git-svn-id: http://svn.osgeo.org/postgis/trunk@11389 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-09 19:38:17 +00:00
Sandro Santilli 0ee2b85a75 Fix potential access to uninitialized value
It would have happened on malformed COMPOUNDCURVE (unlikely).
Hushes compiler warning.

git-svn-id: http://svn.osgeo.org/postgis/trunk@11387 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-09 09:24:13 +00:00
Regina Obe 40b455d466 #1898: Nathan Wagner's patch that adds a flag 2 to allow ST_DelaunayTriangles to dump out a TIN. Just commit and see if winnie has same issue with shp2pgsql-gui checks
git-svn-id: http://svn.osgeo.org/postgis/trunk@11361 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-06 06:48:20 +00:00
Regina Obe 4364f7ad7c #2295 Nathan Wagner patch to support for dumping circular strings in dump points
git-svn-id: http://svn.osgeo.org/postgis/trunk@11349 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-04 13:18:40 +00:00
Regina Obe 4ab040c95d #1818: geohash patch hashbox to geom
git-svn-id: http://svn.osgeo.org/postgis/trunk@11341 b70326c6-7e19-0410-871a-916f4a2858ee
2013-05-03 04:04:22 +00:00
Paul Ramsey 19311e4b2c #2018, Remove old bruteforce function and replace with new one.
git-svn-id: http://svn.osgeo.org/postgis/trunk@11227 b70326c6-7e19-0410-871a-916f4a2858ee
2013-03-29 20:38:14 +00:00
Paul Ramsey 9baacd722f #2018, Distance calculation support for arc features (circstring, compoundcurve, curvepolygon)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11219 b70326c6-7e19-0410-871a-916f4a2858ee
2013-03-28 22:11:09 +00:00
Regina Obe e72dcc2643 change variable used to __MINGW64_VERSION_MAJOR (the mingw64_w32 doesn't have __MINGW64_ (only the mingw64-w64 has that)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11218 b70326c6-7e19-0410-871a-916f4a2858ee
2013-03-28 13:32:44 +00:00
Regina Obe 1aa9515cfc #1668: if mingw64 and it returns <0 switch to _vscprintf native windows implementation. Thanks to swoodbridge for pointing out the define to use.
git-svn-id: http://svn.osgeo.org/postgis/trunk@11217 b70326c6-7e19-0410-871a-916f4a2858ee
2013-03-28 09:30:19 +00:00
Paul Ramsey 9ed745892e #2201, ST_GeoHash wrong on boundaries
git-svn-id: http://svn.osgeo.org/postgis/trunk@11212 b70326c6-7e19-0410-871a-916f4a2858ee
2013-03-26 15:24:19 +00:00
Olivier Courtin f7c7517971 Related to #1553. Add missing free in cu_surface cunit to be valgrind clean. As TGEOM was not used as storage serialization, i purely remove TGEOM for now, and kept only the TIN/POLYHEDRALSURFACE lwgeom expression (will see in future if we really need to have a 3D topological storage PostGIS side)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11205 b70326c6-7e19-0410-871a-916f4a2858ee
2013-03-25 18:41:48 +00:00
Sandro Santilli 5e478a8c0c Make libjson-c optional adding --without-json configure switch (#2202)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11144 b70326c6-7e19-0410-871a-916f4a2858ee
2013-03-05 09:10:26 +00:00
Sandro Santilli 8a62a707d7 Fix parsing GeoJSON of multipolygon with holes (#2216)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11120 b70326c6-7e19-0410-871a-916f4a2858ee
2013-02-28 17:42:49 +00:00
Sandro Santilli 60a4fef503 Add lwgeom_from_geojson to liblwgeom, add cunit test, fix memory leak
git-svn-id: http://svn.osgeo.org/postgis/trunk@11119 b70326c6-7e19-0410-871a-916f4a2858ee
2013-02-28 17:04:44 +00:00
Sandro Santilli b8b3a16c0d Have ST_Summary advertise presence of known srid with an [S] flag
Closes #2178

git-svn-id: http://svn.osgeo.org/postgis/trunk@11004 b70326c6-7e19-0410-871a-916f4a2858ee
2013-01-18 18:09:22 +00:00
Sandro Santilli bea0d083f5 Base vertex snap tolerance in lwline_split_by_point on line length
Fixes robustness issue in splitting line with own vertex (#2173)
Also fixes one case of topology building (#2172)

git-svn-id: http://svn.osgeo.org/postgis/trunk@10973 b70326c6-7e19-0410-871a-916f4a2858ee
2013-01-15 11:54:29 +00:00
Sandro Santilli e4f2312d2d Drop "lwgeom_init_allocators" need, add "lwgeom_set_handlers"
This change allows using liblwgeom from clients which cannot define
C-level methods for link-back (e.g. python ctypes). See #2089.

NOTE: existing clients should take care of calling the new function
      because their "lwgeom_init_allocators" won't be called anymore.
      Failure to do so will result in default allocators / reporters
      being used.

Thanks Giuseppe Sucameli for the base work on this

git-svn-id: http://svn.osgeo.org/postgis/trunk@10937 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-27 12:56:59 +00:00
Sandro Santilli 6af9dfa74e Fix memory leak in lwcollection_homogenize
git-svn-id: http://svn.osgeo.org/postgis/trunk@10896 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-21 10:53:12 +00:00
Sandro Santilli b993d4bbff Fix leak in cu_stringbuffer test
git-svn-id: http://svn.osgeo.org/postgis/trunk@10880 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-20 18:26:48 +00:00
Sandro Santilli addeb71bd2 Fix memory leak in lwmline_locate_along
git-svn-id: http://svn.osgeo.org/postgis/trunk@10878 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-20 18:07:13 +00:00
Sandro Santilli c5c7dac582 Fix memory leak in geometry cleaner
git-svn-id: http://svn.osgeo.org/postgis/trunk@10877 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-20 17:51:38 +00:00
Sandro Santilli 02214975cc Fix memory leaks in lwsegmentize and cu_ptarray
git-svn-id: http://svn.osgeo.org/postgis/trunk@10871 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-20 17:19:13 +00:00
Sandro Santilli 8845553fa7 Fix memory leak in circ_tree_new
git-svn-id: http://svn.osgeo.org/postgis/trunk@10865 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-19 20:52:22 +00:00
Sandro Santilli 2c8a3364b6 Fix leak in cu_geodetic test
git-svn-id: http://svn.osgeo.org/postgis/trunk@10864 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-19 20:52:13 +00:00
Sandro Santilli ec4425d172 Revert "Move JSON input test where it belons (#2156)"
Accidentally committed an unrelated patch..

git-svn-id: http://svn.osgeo.org/postgis/trunk@10860 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-19 18:06:17 +00:00
Sandro Santilli 701c3bc5eb Move JSON input test where it belons (#2156)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10859 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-19 18:01:19 +00:00
Sandro Santilli dee57bfb5f Revert "Return NULL when simplifying a line results in a line with < 2 vertices"
The correct behavior is still being discussed here:
http://trac.osgeo.org/postgis/ticket/1987
Better reduce the noise...

git-svn-id: http://svn.osgeo.org/postgis/trunk@10822 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-13 09:34:48 +00:00
Sandro Santilli 8f391a1bac Return NULL when simplifying a line results in a line with < 2 vertices
Also return NULL from ST_Simplify when the input is an empty
(null is a simpler form than EMPTY...)

Yes, both break backward compatibility, but seem more consistent
to me. I'm still interested in allowing collapses avoidance but
I think consistency is also important.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10821 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-12 15:52:51 +00:00
Paul Ramsey 4fee20abd3 #2145, ST_Segmentize(geography, dist) fails with redundant coordinates
git-svn-id: http://svn.osgeo.org/postgis/trunk@10820 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-09 19:59:42 +00:00
Paul Ramsey 651570c723 #945, expose and add selectivity to the 3d/4d index (&&&) bindings
git-svn-id: http://svn.osgeo.org/postgis/trunk@10796 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-04 19:54:29 +00:00
Sandro Santilli dfbbb65b5e Fix SRID in ST_Homogenize output with collection input (#2129)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10783 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-03 14:10:18 +00:00
Nicklas Avén 7535e82658 #2112
git-svn-id: http://svn.osgeo.org/postgis/trunk@10747 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-28 22:35:56 +00:00
Paul Ramsey 84dae1d537 Try to stomp out -180 (#2066)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10732 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-23 15:57:14 +00:00
Paul Ramsey deedf87abc #1828, fix mistake to geography calculation routine
git-svn-id: http://svn.osgeo.org/postgis/trunk@10729 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-22 17:39:21 +00:00
Sandro Santilli b350ffa858 Fix double free on ST_OffsetCurve exception (#2099)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10705 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-19 15:47:10 +00:00
Sandro Santilli 97eb383320 Restore 1.5.x behaviour of ST_Simplify (#1987)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10702 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-19 10:20:09 +00:00
Paul Ramsey 655f655c73 Comment on the dump_toupper function
git-svn-id: http://svn.osgeo.org/postgis/trunk@10680 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-15 00:15:24 +00:00
Paul Ramsey 810f9ae598 Use a locale-independent braindead upper implementation
git-svn-id: http://svn.osgeo.org/postgis/trunk@10678 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-15 00:08:53 +00:00
Paul Ramsey 0b735b027b #2028, ST_Multi(<triangle>) does not make a TIN
git-svn-id: http://svn.osgeo.org/postgis/trunk@10675 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-14 22:29:23 +00:00
Paul Ramsey a9cdb02b8f #2042, measures.c: 'pt_in_arc_A' may be used uninitialized
git-svn-id: http://svn.osgeo.org/postgis/trunk@10673 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-14 21:31:10 +00:00
Paul Ramsey cd86fc540a #2001, ST_CurveToLine has no effect if the geometry doesn't actually contain an arc
git-svn-id: http://svn.osgeo.org/postgis/trunk@10671 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-14 21:25:52 +00:00
Paul Ramsey f6580e93a1 #799, make geographic coordinates in range
git-svn-id: http://svn.osgeo.org/postgis/trunk@10670 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-14 20:45:16 +00:00
Paul Ramsey a2532cb2b2 #2090, gserialized_read_gbox_p sets Z dimension instead of M dimension for two-point lines
git-svn-id: http://svn.osgeo.org/postgis/trunk@10667 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-13 22:48:31 +00:00
Paul Ramsey 9f81d28526 #2044, lw_arc_length: warning: variable 'a2' set but not used
git-svn-id: http://svn.osgeo.org/postgis/trunk@10666 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-13 22:30:27 +00:00
Paul Ramsey dd03422897 Remove many warnings from -pedantic build, and clean up parser globals a little more thoroughly.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10661 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-09 00:09:35 +00:00
Sandro Santilli c4a1228042 Add note about lwgeom_make_valid being only available with GEOS-3.3+
git-svn-id: http://svn.osgeo.org/postgis/trunk@10636 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-04 00:30:18 +00:00
Paul Ramsey 441a7b3fe7 #2015, ST_IsEmpty('POLYGON EMPTY') returns False
git-svn-id: http://svn.osgeo.org/postgis/trunk@10630 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-02 21:14:44 +00:00
Paul Ramsey 5d014027e7 #1996, ST_AsGeoJSON('POINT EMPTY') produces invalid JSON
git-svn-id: http://svn.osgeo.org/postgis/trunk@10628 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-02 19:15:05 +00:00
Paul Ramsey 38b9137474 Be a bit more explicit about what we're returning from point-in-ring tests.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10626 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-02 19:08:52 +00:00
Paul Ramsey a64f2cb4fd Remove double call of flip test.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10624 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-02 18:02:19 +00:00
Paul Ramsey 11e1a8c0e1 #2019, ST_FlipCoordinates does not update bbox
git-svn-id: http://svn.osgeo.org/postgis/trunk@10621 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-02 17:52:45 +00:00
Paul Ramsey 4252d6b53f Expose some geodetic functions a little higher
git-svn-id: http://svn.osgeo.org/postgis/trunk@10566 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 22:17:39 +00:00
Paul Ramsey 752583350f Fix error in ptarray traversal.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10565 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 20:36:00 +00:00
Paul Ramsey c4baf67134 Reorganize some pointarray loops and functions. Use direct aligned access more.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10564 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 19:29:34 +00:00
Paul Ramsey 7abd94f48e Remove old signature for serialized_form function
git-svn-id: http://svn.osgeo.org/postgis/trunk@10563 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 18:57:32 +00:00
Paul Ramsey 5c0dd8dff3 Allow WKB generation to do direct memcpy of coordinates in specific cases.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10562 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 18:54:27 +00:00
Paul Ramsey 811304a8b1 Use double alignment property to remove memcpy from wkb generation
git-svn-id: http://svn.osgeo.org/postgis/trunk@10561 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 18:42:16 +00:00
Paul Ramsey 1d0a7c266f Remove TODO note: the storage is now double aligned
git-svn-id: http://svn.osgeo.org/postgis/trunk@10560 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 18:29:55 +00:00
Paul Ramsey 9b639c2bc5 Change the gbox calculation for geodetic edges to use 3-space geometry instead of lots of transcendental functions. Much faster, much simpler, all regression tests pass.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10559 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 17:47:24 +00:00
Bborie Park 3f8c3d1fbe Broke string for iowa hex into three parts so that doxygen doesn't choke
git-svn-id: http://svn.osgeo.org/postgis/trunk@10547 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-24 21:14:47 +00:00
Paul Ramsey fcf7bb2699 Whoops make sure the test macros match the library ones
git-svn-id: http://svn.osgeo.org/postgis/trunk@10545 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-24 18:54:23 +00:00
Paul Ramsey 151c40b0de Add some debugging info to find failure in debbie
git-svn-id: http://svn.osgeo.org/postgis/trunk@10544 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-24 18:44:08 +00:00
Paul Ramsey 1db420f36a Add explicit tests for edge_intersects()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10543 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-24 18:28:10 +00:00
Paul Ramsey 8ed2bddfae Move the distance calculation to also use the edge_intersects() function instead of edge_intersection()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10542 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-24 17:26:17 +00:00
Paul Ramsey 635f217ae7 (#2063) fix the vertex-crossing logic in the circular tree code to use the new edge_intersects routine
git-svn-id: http://svn.osgeo.org/postgis/trunk@10532 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-23 22:43:02 +00:00
Paul Ramsey 42ce299b7c (#2026) fix performance regression in geography distance calculation
git-svn-id: http://svn.osgeo.org/postgis/trunk@10531 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-23 22:17:12 +00:00
Paul Ramsey ac9f562660 (#1976) Geography point-in-ring code overhauled for more reliability
git-svn-id: http://svn.osgeo.org/postgis/trunk@10527 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-23 21:18:50 +00:00
Paul Ramsey f60d0da7d0 Future test case for when we've solved p-i-p in generality
git-svn-id: http://svn.osgeo.org/postgis/trunk@10524 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-23 04:56:12 +00:00
Sandro Santilli ebfbe51976 Move trim_trailing_zeros out of liblwgeom.h (#2054)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10454 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-17 14:16:46 +00:00
Sandro Santilli ca09cf4cc4 Get OUT_* export macros out of liblwgeom.h (#2053)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10453 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-17 13:38:49 +00:00
Sandro Santilli 9f7e3edaa1 Do not print more digits than available from lwgeom_to_geojson
See http://trac.osgeo.org/postgis/ticket/2051
Adds tests for the ticket cases.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10451 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-17 11:43:47 +00:00
Sandro Santilli fb4bdad7e5 It is OUT_MAX_DOUBLE_PRECISION, not OUT_MAX_DIGS_DOUBLE, we should use
These macros should really get out of liblwgeom.h and be properly
documented...

git-svn-id: http://svn.osgeo.org/postgis/trunk@10449 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-17 09:52:34 +00:00
Sandro Santilli b7f088f974 Fix buffer overflow in lwgeom_to_geojson (#2052)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10448 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-17 09:45:36 +00:00
Paul Ramsey 3bb6c854c3 Reduce precision test to 1cm2. There is no doubt that this approach is less numerically stable than the last. (#2043) Though in exchange, it covers the globe more completely.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10424 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-12 19:49:27 +00:00
Paul Ramsey 9926faa413 Reduce the precision of the double test... it passes here.. (#2043)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10423 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-12 19:32:26 +00:00
Sandro Santilli 42d62c52ef Fix compiler warnings in lwgeom_geos.c
git-svn-id: http://svn.osgeo.org/postgis/trunk@10415 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-12 08:40:40 +00:00
Sandro Santilli a6b7a4dc38 Fix a "set but not used" warning.
This was about the return from getPoint2d_p, but it really only
returns zero on error and after lwerror was called, and only if
a PARANOIA compile time macro is set...

git-svn-id: http://svn.osgeo.org/postgis/trunk@10414 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-12 08:34:35 +00:00
Sandro Santilli a1b679b776 Fix ptarray_area_sphere signature (#2040)
Since I was a it I also removed a "set but not used" warning.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10413 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-12 08:27:09 +00:00
Paul Ramsey e9bf8eeb82 Improve support for ST_Area(geography) over dateline and poles (#2006, #2039)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10407 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-11 22:48:11 +00:00
Paul Ramsey 9665523267 Move area core calculation to ptarray.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10404 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-11 17:29:55 +00:00
Paul Ramsey 97fc6137b1 Add in arc ptarray vs ptarray and arc ptarray vs arc ptarray distance functions. (#2018)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10390 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-10 00:00:54 +00:00
Paul Ramsey dc469753b7 Add in arc ptarray vs point distance function (#2018)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10387 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-09 22:48:39 +00:00
Paul Ramsey ed2d7c4f6b Fix up some errors in ptarray_arc iteration and the cunit test cases for arc p-i-p. (#2018)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10385 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-09 21:48:39 +00:00
Paul Ramsey d89c7aff1f Point-in-polygon function for arc-based point-arrays. (#2018)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10384 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-09 17:49:03 +00:00
Paul Ramsey cdbf3dd73a Rename lwcircle_calculate_gbox_cartesian_2d to lw_arc_calculate_gbox_cartesian_2d
git-svn-id: http://svn.osgeo.org/postgis/trunk@10358 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-01 22:23:16 +00:00
Paul Ramsey b723ca999e Rename lwcircle_center to lw_arc_center to match other lwalgorithm signatures
git-svn-id: http://svn.osgeo.org/postgis/trunk@10357 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-01 22:18:14 +00:00
Paul Ramsey e92cf6071d Anal retentive code re-organization. Try and move the primitive computational geometry functions into lwalgorithm.c
git-svn-id: http://svn.osgeo.org/postgis/trunk@10356 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-01 22:10:33 +00:00
Paul Ramsey 317c0cb839 Remove unused point in poly function
git-svn-id: http://svn.osgeo.org/postgis/trunk@10343 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-28 22:51:06 +00:00
Paul Ramsey ab42f09e91 Add ptarray_contains_point to ptarray file, so that all other liblwgeom functions can use the one routine.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10342 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-28 22:48:20 +00:00
Paul Ramsey b5174dcf5c Remove no longer used function, lwgeom_pt_inside_circle.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10341 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-28 21:52:51 +00:00
Paul Ramsey 93451957c2 Add new pointer-based coordinate access method, now that aligned storage is the new normal.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10340 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-28 21:48:53 +00:00
Paul Ramsey ddb17de1da Anal retentive function renaming: ptarray_isclosed -> ptarray_is_closed
git-svn-id: http://svn.osgeo.org/postgis/trunk@10339 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-28 21:08:29 +00:00
Paul Ramsey 2002bd670a Move some ptarray functions out of postgis and back into liblwgeom from silly old function that shouldn't even exist anymore (LWGEOM_inside_circle_point)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10338 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-28 20:30:26 +00:00
Paul Ramsey a59a8fb625 Measurement support for arcs (#2018)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10337 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-28 18:23:52 +00:00
Paul Ramsey 503d866d8a Distance calculation support for arc features (#2018). Commit adds lowest level primitive support for distance calculations on single arcs.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10335 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-27 20:23:03 +00:00
Paul Ramsey e6ad2e47e5 #1780 ST_GeoHash should support geography type without cast
git-svn-id: http://svn.osgeo.org/postgis/trunk@10278 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-13 02:08:45 +00:00
Paul Ramsey b34346b012 correct length for closed circles (#1978)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10257 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-07 22:20:00 +00:00
Paul Ramsey 9501edfd76 Fix cunit crash due to lack of proper signature for lwgeom_segmentize_sphere in header.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10252 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-07 19:54:52 +00:00
Paul Ramsey db8385a18c ST_Distance to a one-point LineString returns NULL (#1957)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10251 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-07 18:27:49 +00:00
Paul Ramsey e508329bcb ST_Segmentize(geography, maxseglength) (#1962)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10195 b70326c6-7e19-0410-871a-916f4a2858ee
2012-08-22 21:04:34 +00:00
Paul Ramsey da9ecad043 ST_Intersects(geography) returns incorrect result for pure-crossing cases (line cross line, line crosses polygon) (#1958)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10194 b70326c6-7e19-0410-871a-916f4a2858ee
2012-08-21 18:22:41 +00:00
Paul Ramsey 91f8b43387 Crash in ST_Distance (#1951)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10183 b70326c6-7e19-0410-871a-916f4a2858ee
2012-08-15 18:55:56 +00:00
Paul Ramsey c73e21d15f Allow circtree nodes to have more than 2 children (#1910)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10046 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-12 03:38:03 +00:00
Paul Ramsey 34c7e98abc Comment on methodology behind tree node merging
git-svn-id: http://svn.osgeo.org/postgis/trunk@10045 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-11 19:33:00 +00:00
Paul Ramsey c182f0a93a Add note for future pain
git-svn-id: http://svn.osgeo.org/postgis/trunk@10043 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-11 04:14:20 +00:00
Paul Ramsey e47e3940e9 Fix issue with projecting from the poles, retain the source longitude for more sensible result.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10042 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-11 04:05:57 +00:00
Paul Ramsey b28a605814 Fix a NaN result leaking into the tree building algorithm (optimized 32 bit code only!).
git-svn-id: http://svn.osgeo.org/postgis/trunk@10041 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-10 20:32:54 +00:00
Paul Ramsey 256159f3b9 Handle best SRID finding for shapes the cross the poles and dateline. Also add some new larger zones in gnomic for larger shapes. (#1610)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10038 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-06 23:50:33 +00:00
Paul Ramsey a038a8cb10 Fix issue where the cached object is a point and the uncached one is a polygon. (#1796)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10037 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-05 19:15:28 +00:00
Paul Ramsey 5294886998 Fix problems with circtree building on short edges near the poles. (#1796)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10035 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-04 18:11:25 +00:00
Paul Ramsey 204749eab6 Fix problem thresholded distance searching in circ-trees. (#1796)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10006 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-01 14:24:37 +00:00
Sandro Santilli 080978de4b Add lwgeom_delaunay_triangulation (#1215)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9993 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-27 14:26:47 +00:00
Sandro Santilli d1ac0f0361 Use LDFLAGS environment when building liblwgeom (#1891)
Thanks mweisman

git-svn-id: http://svn.osgeo.org/postgis/trunk@9992 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-27 08:26:11 +00:00
Regina Obe d71d22320d #1866 -- apply same geom_equal hack as we did in build area so differnt order of geometries in resulting geomcollection is ignored
git-svn-id: http://svn.osgeo.org/postgis/trunk@9983 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-25 09:06:07 +00:00
Paul Ramsey c9010e7ce7 ST_LocateAlong chokes on some value combinations (#1874)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9958 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-20 03:01:58 +00:00
Paul Ramsey 7ecbeee84e ST_InterpolatePoint returns empty M value (#1873)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9955 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-19 20:47:45 +00:00
Paul Ramsey 1dd2a18458 Fix mistake in tree p-i-p return value.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9951 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-19 18:11:03 +00:00
Paul Ramsey a6f362e30e Add in SQL binding for circ-tree cached searching. Currently in *Cached variants to allow comparisons.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9949 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-19 03:42:30 +00:00
Paul Ramsey b5e299620f Fix mistake in handling crossings-at-a-vertex
git-svn-id: http://svn.osgeo.org/postgis/trunk@9948 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-18 23:59:37 +00:00
Paul Ramsey d6a24f990b Silence a warning
git-svn-id: http://svn.osgeo.org/postgis/trunk@9935 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-18 22:02:54 +00:00
Paul Ramsey f4d09fe6af Quiet some warnings.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9930 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-18 20:14:44 +00:00
Paul Ramsey 784d85eb47 Hide internal arguments for tree calculations and shut up the print output.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9919 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-15 23:53:33 +00:00
Paul Ramsey c90d7682d7 Add circular tree calculations and associated tests in support of faster geography calculations.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9916 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-15 22:51:57 +00:00
Sandro Santilli 6743c67e8f Add test for MULTIPOINT processing
git-svn-id: http://svn.osgeo.org/postgis/trunk@9893 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-12 09:30:21 +00:00
Sandro Santilli f556e4b466 Add GEOMETRYCOLLECTION input support for ST_MakeValid (#1719)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9892 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-12 09:09:06 +00:00
Sandro Santilli 9de4f47d96 Handle exceptions from GEOSUnionCascaded() in LWGEOM_GEOS_buildArea
git-svn-id: http://svn.osgeo.org/postgis/trunk@9821 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-25 15:20:50 +00:00
Olivier Courtin 3db83462ff Use NULL value as default for id on ST_AsGML cunit tests. Related to #1823
git-svn-id: http://svn.osgeo.org/postgis/trunk@9778 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-22 12:23:35 +00:00
Olivier Courtin f7d50658af Fix some unintialized vars. Fix becoming wrong prototype call in GML3 cunit tests. Related to #1823
git-svn-id: http://svn.osgeo.org/postgis/trunk@9775 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-22 08:49:36 +00:00
Olivier Courtin b49ecf607c First implementation of gml:id support for ST_AsGML. Related to #1823. Not yet really tested. Cunit still missing
git-svn-id: http://svn.osgeo.org/postgis/trunk@9772 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-21 21:17:59 +00:00
Paul Ramsey cc9745bb87 Accept PostGIS 1.5 WKB type numbers in WKB parser (#1807)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9761 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-21 09:36:02 +00:00
Paul Ramsey a9b2aca592 Error in empty short circuit (#1828)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9744 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-17 11:54:43 +00:00
Sandro Santilli a9ec4df52a Add lwgeom_normalize in LIBLWGEOM, use in cu_buildarea tester
git-svn-id: http://svn.osgeo.org/postgis/trunk@9742 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-17 11:45:26 +00:00
Sandro Santilli b6023cb85c Cleanup new BuildArea code, add profiling prints (#1806)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9732 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-10 07:24:08 +00:00
Sandro Santilli f81decb8a1 Significatively speedup BuildArea with complex input (#1806)
Affects ST_BuildArea, ST_MakeValid and ST_GetFaceGeometry.

Replaces the iterated SymDifference used since 2005 with a more
scalable algorithm. The new algorithm removes from the polygonized
result all polygons whose rings are known to be already represented
by holes or shells of other polygons and finally runs a single
overlay operation (unary union).

With the case attached to ticket #1806, ST_BuildArea completes
within 12 seconds using the new code while it takes 27 _minutes_
with the old. Both versions return the same result (according to
ST_Equals).

git-svn-id: http://svn.osgeo.org/postgis/trunk@9731 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-09 12:08:16 +00:00
Sandro Santilli 773dd56ad7 Add unit test for lwgeom_buildarea (useful for #1806)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9730 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-09 12:08:06 +00:00
Sandro Santilli 82926b188e ST_BuildArea: arrange polygonized output reducing overlay cost (#1806)
By running SymDifference against items with less points first we
reduce the overall cost (output vertices tend to always grow).

git-svn-id: http://svn.osgeo.org/postgis/trunk@9729 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-08 16:47:40 +00:00
Sandro Santilli bbbedbb401 liblwgeom depends on postgis_config.h and postgis_svn_revision.h (#1786)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9656 b70326c6-7e19-0410-871a-916f4a2858ee
2012-04-24 09:16:17 +00:00
Paul Ramsey 488412eb37 Fix incorrect call to geom->type where geom->flags is needed
git-svn-id: http://svn.osgeo.org/postgis/trunk@9651 b70326c6-7e19-0410-871a-916f4a2858ee
2012-04-20 03:28:42 +00:00
Paul Ramsey 7fba2e0c26 st_isclosed() doesn't return false for unclosed POLYGONS only LINESTRINGS (#1756)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9650 b70326c6-7e19-0410-871a-916f4a2858ee
2012-04-20 03:23:47 +00:00
Sandro Santilli 5a74e2c988 fix ST_SymDifference(empty, geom) to return geom (#1776)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9641 b70326c6-7e19-0410-871a-916f4a2858ee
2012-04-13 21:04:15 +00:00
Sandro Santilli c1a7bd366f Fix NaN from ptarray_locate_point with zero-length lines (#1772)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9630 b70326c6-7e19-0410-871a-916f4a2858ee
2012-04-12 07:21:38 +00:00
Sandro Santilli 49a0e802d1 Fix comment doc about lwline_split_by_point_to
git-svn-id: http://svn.osgeo.org/postgis/trunk@9629 b70326c6-7e19-0410-871a-916f4a2858ee
2012-04-12 07:21:23 +00:00
Sandro Santilli ef23e9cc80 Call config.status if liblwgeom.h.in newer than liblwgeom.h (#1691)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9623 b70326c6-7e19-0410-871a-916f4a2858ee
2012-04-10 15:51:06 +00:00
Sandro Santilli 150b274d69 Allow for 1.#INF to be threated as Inf (#1736)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9613 b70326c6-7e19-0410-871a-916f4a2858ee
2012-04-05 09:11:51 +00:00
Sandro Santilli fd783e7b6b Have BuildArea catch exception from GEOSSymDifference (#1738)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9581 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-30 08:36:17 +00:00
Paul Ramsey 4c6b078e68 Skip over geodetic check for empty geometries.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9538 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-23 21:07:00 +00:00
Paul Ramsey 3d2539a7de Allow build to work under DEBUG=5
git-svn-id: http://svn.osgeo.org/postgis/trunk@9537 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-23 19:14:13 +00:00
Paul Ramsey 01828634d2 Parse error on WKT for multi with empty elements (#1703)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9530 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-22 16:55:18 +00:00
Sandro Santilli 5dfa7e3cc4 Add a ptarray_simplify parameter to preserve min vertices (#1698)
A polygon ring collapsed to a segment is still better handled by
mapnik than the same ring collapsed to a single point. This commit
retains at least 3 vertices for polygons.

git-svn-id: http://svn.osgeo.org/postgis/trunk@9528 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-22 15:07:03 +00:00
Sandro Santilli d89b799534 Do not drop collapsed polygon shells (#1698)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9527 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-22 15:06:52 +00:00
Paul Ramsey cf8753bd36 Make distclean should remove all the Makefile's generated by ./configure
git-svn-id: http://svn.osgeo.org/postgis/trunk@9522 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-21 20:32:29 +00:00
Sandro Santilli 8953eee57c Be quieter on polygon ring collapse (in ST_Simplify)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9514 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-16 19:11:09 +00:00
Sandro Santilli 082d160615 Add simple tests to stringbuffer class (#1668)
Hopefully these fail on windows so it's easier to test.
It may take a memory debugger to really see the failure.

git-svn-id: http://svn.osgeo.org/postgis/trunk@9487 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-13 17:08:59 +00:00
Sandro Santilli b5887ec9f7 Rename misc testsuite to "misc"
git-svn-id: http://svn.osgeo.org/postgis/trunk@9486 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-13 17:08:48 +00:00