Commit graph

108 commits

Author SHA1 Message Date
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 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
Paul Ramsey 49d9ea4505 lwgeom_release (#699), reviewed all usage of lwgeom_release
and replaced with lwgeom_free where possible. Changed the
def'n of lwgeom_release so that it only frees the containing
objects, and not any sub-objects, for those few remaining
cases that required a gentler freeing of objects.


git-svn-id: http://svn.osgeo.org/postgis/trunk@9072 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-07 19:42:49 +00:00
Sandro Santilli 6ef84a957a Don't let ST_Multi create collections of a single EMPTY (#1489)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8892 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-20 14:47:24 +00:00
Sandro Santilli 10732e13a9 Implement lwgeom_same for MULTICURVE and MULTISURFACE (#1475)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8831 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:24:54 +00:00
Sandro Santilli 615bdce18a Implement lwgeom_same for CURVEPOLYGON types (#1475)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8830 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:21:09 +00:00
Sandro Santilli fa2077921b Implement lwgeom_same for COMPOUNDCURVE (#1475)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8829 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:18:07 +00:00
Sandro Santilli 6e285b15a1 Implement lwgeom_same for circularstring (#1475)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8828 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 10:11:44 +00:00
Sandro Santilli 6b4c747328 A CURVEPOLY is also a collection. Fixes #1473.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8827 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-16 09:11:45 +00:00
Sandro Santilli bfa3222be1 Reflect type of empty from ST_Dimension (#1441)
No existing testcase fail, no new testcase is added.
This change doesn't invalidate any part of the reference manual.
Reference manual isn't updated.

Signed-off-by: Charlie Brown

git-svn-id: http://svn.osgeo.org/postgis/trunk@8748 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-10 14:58:16 +00:00
Sandro Santilli c532c9b846 Add lwgeom_construct_empty API call
git-svn-id: http://svn.osgeo.org/postgis/trunk@8720 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-09 17:01:48 +00:00
Paul Ramsey c71f36af42 Move offset curve generation into liblwgeom with other geos functionality
git-svn-id: http://svn.osgeo.org/postgis/trunk@8689 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-06 21:39:50 +00:00
Sandro Santilli 26fbbe9457 Add a public lwgeom_get_bbox function (#1324)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8335 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-09 14:37:16 +00:00
Sandro Santilli 4a1645eaab Don't let lwgeom_add_bbox syntetize a fake box for empty geometries
Empty geometries have no box. Period.
Update GML extent output for empty geometries to handle the special
case by using empty tags. Regress test it.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8334 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-09 14:37:11 +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 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 07f2341e38 Ensure calls to lwgeom->type use type of uint8_t
git-svn-id: http://svn.osgeo.org/postgis/trunk@8027 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-28 17:01:02 +00:00
Paul Ramsey 912a2ca7db Remove serialized_form functions:
lwpoint_serialize_size
lwpoint_serialize
lwpoint_serialize_buf
lwline_serialize_size
lwline_serialize
lwline_serialize_buf
lwpoly_serialize_size
lwpoly_serialize
lwpoly_serialize_buf
lwtriangle_serialize_size
lwtriangle_serialize
lwtriangle_serialize_buf
lwcircstring_serialize_size
lwcircstring_serialize
lwcircstring_serialize_buf
lwcollection_serialize_size
lwcollection_serialize_buf
lwgeom_constructempty
lwgeom_constructempty_buf
lwgeom_empty_length
lwgeom_serialize_size
lwgeom_serialize
lwgeom_serialized_construct
lwgeom_getsrid



git-svn-id: http://svn.osgeo.org/postgis/trunk@8023 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-27 21:03:00 +00:00
Paul Ramsey 62203821fa Remove old deserialze and inspected functions.
serialized_lwgeom_size
lwgeom_size_subgeom
lwgeom_size_point
lwgeom_size_line
lwgeom_size_circstring
lwgeom_size_poly
lwgeom_size_triangle
lwgeom_deserialize
lwpoint_deserialize
lwline_deserialize
lwpoly_deserialize
lwtriangle_deserialize
lwcircstring_deserialize
lwmpoint_deserialize
lwmline_deserialize
lwmpoly_deserialize
lwcollection_deserialize
lwcompound_deserialize
lwcurvepoly_deserialize
lwmcurve_deserialize
lwmsurface_deserialize
lwpsurface_deserialize
lwtin_deserialize
printMULTI
lwgeom_inspect
lwgeom_getpoint_inspected
lwgeom_getpoint
lwgeom_getline_inspected
lwgeom_getline
lwgeom_getpoly
lwgeom_getpoly_inspected
lwgeom_gettriangle
lwgeom_gettriangle_inspected
lwgeom_getcircstring_inspected
lwgeom_getgeom_inspected
lwgeom_getsubgeometry
lwgeom_getsubgeometry_inspected
lwgeom_getsubtype
lwgeom_getsubtype_inspected
lwgeom_getnumgeometries
lwgeom_getnumgeometries_inspected




git-svn-id: http://svn.osgeo.org/postgis/trunk@8018 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-27 20:05:32 +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
Paul Ramsey afa9374199 Change "no SRID" SRID to 0 (#286)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7912 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-28 23:38:56 +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 60b4daef28 Remove old WKB/WKT parsers and generators and switch all internal references remaining (mostly in cunit) over to the new implementations.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7721 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-10 22:28:05 +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
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 2ac38cfd53 ST_IsValidDetail and ST_IsValidReason POLYGON CRASH (#712)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7491 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-26 17:31:30 +00:00
Paul Ramsey 0fbe086266 ST_GeoHash POLYGON Empty crash (#711)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7445 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-22 21:33:18 +00:00
Paul Ramsey 46133d5280 Guard against empty in isclosed (#740)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6542 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-30 16:54:32 +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 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 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 50fb1f2d2d Remove oddity around gbox duplication
git-svn-id: http://svn.osgeo.org/postgis/trunk@6442 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-18 04:54:22 +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 b05eea79c6 Rename lwgeom_from_wkt to lwgeom_parse_wkt to note the use of the parser object.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6294 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-08 00:02:31 +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 e777a7957f Move is_closed fully to liblwgeom and remove LWGEOM_INSPECTED from IsClosed
git-svn-id: http://svn.osgeo.org/postgis/trunk@6265 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-02 19:09:57 +00:00
Paul Ramsey 02d051c339 Remove LWGEOM_INSPECTED from ndims
git-svn-id: http://svn.osgeo.org/postgis/trunk@6259 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-02 17:38:18 +00:00
Paul Ramsey b8522c6da8 Remove GET_GETTYPE from some functions.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6256 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-02 16:13:39 +00:00
Paul Ramsey 5d996dd61e Remove LWGEOM_INSPECTED from perimeter calculation
git-svn-id: http://svn.osgeo.org/postgis/trunk@6238 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-01 20:28:29 +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
Paul Ramsey 5e8f733459 Move area calculations fully to liblwgeom and remove LWGEOM_INSPECTED
git-svn-id: http://svn.osgeo.org/postgis/trunk@6214 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-30 21:54:55 +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 3c8910ea90 Flip nrings function from serialized to lwgeom based.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6177 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-18 18:37:27 +00:00