Paul Ramsey
7c3a73c89d
Reorder to C standard
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@13373 b70326c6-7e19-0410-871a-916f4a2858ee
2015-03-20 15:43:06 +00:00
Paul Ramsey
90f6ba3ed4
#3069 , bounding boxes added to simple objects on deserialization
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@13302 b70326c6-7e19-0410-871a-916f4a2858ee
2015-03-04 19:47:33 +00:00
Paul Ramsey
aab816f87d
Move snap-to-grid functions into lwgeom where they belong.
...
Modernize geometry construction to use accessors more
git-svn-id: http://svn.osgeo.org/postgis/trunk@13255 b70326c6-7e19-0410-871a-916f4a2858ee
2015-02-20 20:31:25 +00:00
Paul Ramsey
72679d9daa
#3050 Peak into header for GeometryType
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@13253 b70326c6-7e19-0410-871a-916f4a2858ee
2015-02-20 18:22:33 +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
Sandro Santilli
9acf63d0cb
Fix a bug in gserialized_read_gbox_p reading garbage in EMPTY point
...
Includes cunit test. Fixes #1458 .
git-svn-id: http://svn.osgeo.org/postgis/trunk@8785 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-12 08:52:03 +00:00
Sandro Santilli
a58b999828
Expose gbox_float_round to liblwgeom API
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8783 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-12 08:51:53 +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
f4d0271104
gbox_float_round: don't roundup Z value if the box doesn't have one
...
Fixes #1309
git-svn-id: http://svn.osgeo.org/postgis/trunk@8336 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-09 15:33:14 +00:00
Sandro Santilli
2b175a2560
Hush warning about missing prototype.
...
This is really a commit intended to amend the previous for the sake
of pointing to the correct bug being closed by it: #1273 (not #1023
which is more complex)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8204 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-21 12:10:25 +00:00
Sandro Santilli
a12f1614a8
Have gserialized_get_gbox_p always return a round-to-float box
...
That is, even when computing the box from scratch.
This makes the box always float-oriented,
consistently between cached and computed boxes.
Closes (hopefully forever) bug #1023 .
Includes testcase otherwise failing.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8203 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-21 12:03:48 +00:00
Sandro Santilli
beb62064f5
Make sure to "round-to-float" boxes read from serialized, no matter if there was or not a cache. Fixes #1273 . Includes regress testing. Note: would be worth to also test the 2-points line case (I didn't in this specific commit, but the patch should fix that as well).
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8134 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-10 11:10:19 +00:00
Paul Ramsey
8b18d8006f
Composite geometries end up with nested BBOX caches ( #1254 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8078 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-02 04:28:05 +00:00
Paul Ramsey
2398afc183
Move gserialized_get_gbox_p to liblwgeom and gserialized_read_gbox_p to liblwgeom_internal
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8066 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-31 20:55:05 +00:00
Paul Ramsey
2844486b6c
Rename pglwgeom_box2d_p
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8065 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-31 20:23:44 +00:00
Paul Ramsey
183dde1c71
Remove pglwgeom_ndims
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8046 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-29 20:35:41 +00:00
Paul Ramsey
475ce68b84
Remove pglwgeom_get_zm
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8044 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-29 20:04:04 +00:00
Paul Ramsey
ed669e1e99
Remove pglwgeom_has_bbox, pglwgeom_has_z, pglwgeom_has_m
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8040 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-29 00:58:28 +00:00
Paul Ramsey
77b1fcfecb
Remove BOX2DFLOAT4->GBOX and PG_LWGEOM->GSERIALIZED #defines
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8034 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-28 20:46:18 +00:00
Sandro Santilli
da5f340340
Clamp SRID on serialization and deserialization. Raise an error when clamp_srid receives a number > 999999
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7963 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-10 07:38:27 +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
Paul Ramsey
478d697722
Change srid from uint32 to int32 and update gserialized and TYPMOD handlers to deal with signed SRIDs
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6480 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-22 21:16:06 +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
27d02acd29
More clean-up and work on using gserialized.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6463 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-21 21:39:28 +00:00
Paul Ramsey
59e64e6569
Push the UNKNOWN forcing down into gserialized get/set
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6462 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-21 18:01:27 +00:00
Paul Ramsey
079be83c16
ST_Intersection for geography is really messed up ( #723 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6453 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-20 19:16:33 +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
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
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
Olivier Courtin
df80a93181
Change SRID to srid in LWGEOM struct (and also in CHIP too). Rename some functions related to SRID from Camel notation to lower case: errorIfSRIDMismatch, pglwgeom_getSRID, pglwgeom_setSRID, LWGEOM_getSRID, LWGEOM_setSRID, hasSRID. Related to #658
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6204 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-25 17:34:21 +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
32e4d5caee
Clean out scruft from my G_ phase and start attempting to separate _internal from external liblwgeom functions.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6157 b70326c6-7e19-0410-871a-916f4a2858ee
2010-10-31 02:31:34 +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
Olivier Courtin
8fea23dce8
Add Triangle and TIN new geometry type. Add Cunit tests on parse stage, related to #561 . Add ST_AsGML support TIN and Triangle for GML 3. Slightly cast change in PolyhedralSurface LWGEOM struct Remove PolyhedralSurface support from forceRHR function as orientation is meaningfull in PS. Move is_closed functions from PostGIS to LWGEOM dir and related cunit test case on line and curves.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5821 b70326c6-7e19-0410-871a-916f4a2858ee
2010-08-13 17:29:29 +00:00
Olivier Courtin
15272e3b0b
lwtype_name session. cf #453
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5791 b70326c6-7e19-0410-871a-916f4a2858ee
2010-08-06 21:31:54 +00:00
Olivier Courtin
c3a59d10f8
Add geography support for POLYHEDRALSURFACE. Related to #427
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5770 b70326c6-7e19-0410-871a-916f4a2858ee
2010-08-04 20:02:26 +00:00
Paul Ramsey
1ca9049cde
Some function renaming: lwgeom_typename => lwtype_name. The internal float/up/down functions get slightly better names. Make collection types re-sizable: added maxgeoms to all collections, and created lwcollection_add_lwgeom() function. Remove all *_add functions. Revized homogenize function to use the new _add_lwgeom and variants.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5439 b70326c6-7e19-0410-871a-916f4a2858ee
2010-03-16 03:13:33 +00:00
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
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
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
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
Paul Ramsey
2342776218
Fix serialization problem with lwgeoms that have bboxes.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4509 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-17 05:57:12 +00:00
Paul Ramsey
51dbcb9bbf
Clean up gbox serialization a little
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4508 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-17 05:33:35 +00:00
Paul Ramsey
6699aa3199
Work on tracking down bug in casting geometry->geography
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4506 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-17 00:01:53 +00:00
Paul Ramsey
154a0f5bcb
More tests pass
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4503 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-16 20:19:20 +00:00
Paul Ramsey
03cbe95845
Geocentric bounding box roughed in and compiles.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4499 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-15 19:50:24 +00:00