Commit graph

91 commits

Author SHA1 Message Date
Paul Ramsey 8fb855139d #3048, speed up simplify
git-svn-id: http://svn.osgeo.org/postgis/trunk@13248 b70326c6-7e19-0410-871a-916f4a2858ee
2015-02-20 15:18:25 +00:00
Sandro Santilli c35b276bbf Implement interruptability of ST_Segmentize(geometry)
Includes testcases at sql and cunit levels.
Closes #2893

git-svn-id: http://svn.osgeo.org/postgis/trunk@13105 b70326c6-7e19-0410-871a-916f4a2858ee
2014-10-22 14:22:25 +00:00
Sandro Santilli bc0544f947 Update comment above getPoint2d_internal, it is safe to cast now
git-svn-id: http://svn.osgeo.org/postgis/trunk@12986 b70326c6-7e19-0410-871a-916f4a2858ee
2014-09-18 16:22:38 +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
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
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
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 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 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 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 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 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 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 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 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
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
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
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 a389fd3cdc Check args passed to ptarray_set_point4d
git-svn-id: http://svn.osgeo.org/postgis/trunk@9363 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-01 12:25:50 +00:00
Paul Ramsey 883b8860cb ST_Segmentize returns invalid LINESTRING for zero-length input (#1304)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8971 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-30 21:52:47 +00:00
Sandro Santilli e916935621 Don't let ptarray_append_ptarray change read-only pointarrays
git-svn-id: http://svn.osgeo.org/postgis/trunk@8929 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-26 12:59:51 +00:00
Sandro Santilli 925d626bbd Implement ptarray_append_ptarray, and change its signature
This is propedeutic to ticket #1500

git-svn-id: http://svn.osgeo.org/postgis/trunk@8926 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-26 09:16:37 +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
Paul Ramsey acc2cfbad5 Interim progress on LRS work.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8726 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-09 18:27:30 +00:00
Paul Ramsey 22c50e8e1b ST_AddPoint returns incorrect result on Linux (#1335) from roualt
git-svn-id: http://svn.osgeo.org/postgis/trunk@8257 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-29 20:22:40 +00:00
Sandro Santilli 80aca4236e Add a vertex-snap-tolerance parameter to ptarray_substring
This is aimed at improving robustness for ST_Split, which now
uses an hard-coded tolerance of 1e-14 (see #1311)

git-svn-id: http://svn.osgeo.org/postgis/trunk@8212 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-21 16:32:27 +00:00
Sandro Santilli 70e7934d65 Do not memcpy to self in ptarray_reverse (see #1302)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8193 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-20 21:19:12 +00:00
Sandro Santilli 51f91a5015 Re-fix robustness issue on 32bit system (seg is 0-based, npoints is 1-based but segments is npoints-1)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8115 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-08 10:23:07 +00:00
Sandro Santilli 5233a6baf7 Fix st_line_locate_point check for "last point" (#1271)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8112 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-08 08:51:15 +00:00
Sandro Santilli c26ff81c65 Enhance robustness of ptarray_locate_point, fixing bug #1269.
Includes regression testcase.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8107 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-07 17:01:50 +00:00
Paul Ramsey 4bd609aeff Remove orphaned _compute_box3d functions
git-svn-id: http://svn.osgeo.org/postgis/trunk@8029 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-28 17:44:00 +00:00
Paul Ramsey b38b09da0e Remove *_compute_box2d* functions that are now orphans.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8006 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-26 22:36:22 +00:00
Sandro Santilli 809ae790e4 Move LWDEBUG macros in a new lwgeom_log.h header file (see #1220)
Update all implementation files accordingly.
Fix some misuses out of liblwgeom.
Add missing copyright notices in a few files.

git-svn-id: http://svn.osgeo.org/postgis/trunk@7907 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-28 10:05:36 +00:00
Sandro Santilli b131652f6c Drop (u)int32 and uchar in favor of C99 standard int types [RT-SIGTA]
This commit drops PostgreSQL references in liblwgeom.h (C_H define)
and hopefully reduces the noise generated by custom symbols.

git-svn-id: http://svn.osgeo.org/postgis/trunk@7761 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-19 09:34:58 +00:00
Sandro Santilli f9b94014f1 Drop REPEATED_POINTS_* and SPLICE_* defines from liblwgeom.h, move MAXFLOAT to liblwgeom_internal.h [RT-SIGTA]
git-svn-id: http://svn.osgeo.org/postgis/trunk@7716 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-09 15:12:06 +00:00
Sandro Santilli 092bfedef2 Implement ptarray_clone (shallow) and update clone documentation (doxygen), have lw*_clone clone the POINTARRAY but not the serialized point list (using ptarray_clone), add unit testing for lwgeom_clone. See ticket #1102.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7608 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-06 14:29:26 +00:00
Sandro Santilli d33f3e4c46 Rename ptarray_clone to ptarray_clone_deep, to be conformant with lwgeom_clone_deep in that it copies the serialized pointlist too
git-svn-id: http://svn.osgeo.org/postgis/trunk@7605 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-06 09:40:38 +00:00
Paul Ramsey 45db0c6bf6 Remove memory leaks when a parse error kicks out in WKT (#1102)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7587 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-04 22:51:37 +00:00
Paul Ramsey c3e6c0c363 ST_AddPoint is broken (#662)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6491 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-23 18:03:30 +00:00
Paul Ramsey 4a8cccc765 Remove some ST_ variants of cast-support functions (#302), and start legacy.sql.in.c (#722)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6467 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-21 23:56:23 +00:00
Paul Ramsey fd6d759590 Re-orgs to push the geodetic/cartesian divide a little further under the covers as part of the geometry/geography group hug at the index bindings level.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6437 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-17 20:10:36 +00:00
Paul Ramsey c5c1ffbe5f Fix up failure in distance calculation (#705) and replace some SRID -1 with SRID_UNKNOWN
git-svn-id: http://svn.osgeo.org/postgis/trunk@6349 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-13 19:25:15 +00:00
Paul Ramsey 1ae5b8f68b ptarray_free now frees the serialized_ptlist, unless FLAGS_GET_READONLY is set.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6340 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-11 00:28:57 +00:00
Paul Ramsey a2dbab5b3f Fix cunit failures on Polyhedral surface (#697)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6333 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-10 19:10:16 +00:00
Paul Ramsey b29ea47814 Remove more appeals to pglwgeom->type
git-svn-id: http://svn.osgeo.org/postgis/trunk@6314 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-08 23:40:38 +00:00
Paul Ramsey 4cc4123357 Replace the old WKB/WKT parser and emitters with the new ones.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6291 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-07 21:08:05 +00:00
Paul Ramsey a1ea60fccf Make use of ptarray api for manipulating serialized_pointlist
git-svn-id: http://svn.osgeo.org/postgis/trunk@6274 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-03 16:53:33 +00:00