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
Paul Ramsey
7e82a76279
Move affine transforms into liblwgeom and expunge LWGEOM_INSPECTED
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6220 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-01 00:53:03 +00:00
Paul Ramsey
5ff93efd20
Move length calculations fully to liblwgeom and remove LWGEOM_INSPECTED
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6215 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-30 22:55:54 +00:00
Olivier Courtin
586c389dc8
Change POINTARRAY.dims to POINTARRAY.flags. Related to #658
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6205 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-25 18:38:20 +00:00
Paul Ramsey
262696c293
Make the ptarray_add_point behavior more explicit.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6190 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-23 00:44:24 +00:00
Paul Ramsey
fa620c46e1
Update force2d to preserve repeated points.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6188 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-23 00:16:30 +00:00
Paul Ramsey
719561604f
Make ptarray_append_point handle higher dimensions more consistently.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6186 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-22 22:23:02 +00:00
Olivier Courtin
931390d022
#658 part 1. Enhance LWGEOM struct (type, flags and GBOX) and related functions call.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6180 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-21 19:02:23 +00:00
Paul Ramsey
4afb908dba
An argument for git. This massive commit includes the renaming of function in the ptarray API, the removal of some pointArray_* variants in favor of ptarray_* variants, and, importantly, the adition of _append_point and _insert_point options for pointarrays. Functions have been switched over to using the API instead of managing the serialized_pointlist themselves. This has necessitated the re-writing of some functions. Simplify2d and Force2d have been re-written as lwgeom functions instead of serialized form functions, and moved into liblwgeom. There are still some major functions to move into liblwgeom, including the point_in_polygon functions that support the intersects shortcuts and the linear referencing fuctions in lwgeom_functions_analytic.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6175 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-18 05:28:19 +00:00
Paul Ramsey
e7c8b8f73d
Change pointArray_construct() to ptarray_construct_reference_data()
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6170 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-04 23:21:06 +00:00
Paul Ramsey
f544929bb3
Remove DYNPTARRAY and all users of it
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6161 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-01 08:11:06 +00:00
Paul Ramsey
0bb9c409dd
Flip all the internal liblwgeom files over to use liblwgeom_internal.h
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6160 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-01 01:28:12 +00:00
Paul Ramsey
33b6ad1711
Add in the ISO extended types to the WKT parser and emitter.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6101 b70326c6-7e19-0410-871a-916f4a2858ee
2010-10-22 23:27:13 +00:00
Paul Ramsey
37111647d5
Put the WKT new parser files into repo so others can see them and I can work in synch with trunk.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6060 b70326c6-7e19-0410-871a-916f4a2858ee
2010-10-10 00:08:58 +00:00
Paul Ramsey
e46724c479
Fix syntax error in ptarray_segmentize2d introduced in last commit
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6039 b70326c6-7e19-0410-871a-916f4a2858ee
2010-10-03 19:57:05 +00:00
Paul Ramsey
e2817f8957
Ensure maxpoints is filled in appropriately
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6038 b70326c6-7e19-0410-871a-916f4a2858ee
2010-10-03 19:43:49 +00:00
Paul Ramsey
2d07d7eb59
Continue with new WKB parser. Change signature of RHR "right hand rule" functions to "clockwise" to avoid misinterpretations of orientation rules.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6036 b70326c6-7e19-0410-871a-916f4a2858ee
2010-10-03 18:14:35 +00:00
Mark Cave-Ayland
d7bea1f4aa
Fix #581 : LWGEOM_expand produces inconsistent results. Change the bounding box calculation routines in ptarray.c so that they perform the entire calculation in double precision then convert the final result to BOX2DFLOAT4. This prevents rounding errors being introduced into the bounding box when each input result is converted to BOX2DFLOAT4 in turn.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5923 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-10 08:50:02 +00:00
Olivier Courtin
c09ea80cd2
Astyle session on whole trunk
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5825 b70326c6-7e19-0410-871a-916f4a2858ee
2010-08-15 08:30:08 +00:00