]> granicus.if.org Git - postgis/commitdiff
Remove pglwgeom_has_bbox, pglwgeom_has_z, pglwgeom_has_m
authorPaul Ramsey <pramsey@cleverelephant.ca>
Sat, 29 Oct 2011 00:58:28 +0000 (00:58 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Sat, 29 Oct 2011 00:58:28 +0000 (00:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8040 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/g_serialized.c
liblwgeom/liblwgeom.h.in

index 85134e13f74f0a1370984d1a28a150e039ab4974..9799dd7325d9926851cc4ea34880ffb43c36f4b3 100644 (file)
 * GSERIALIZED metadata utility functions.
 */
 
+int gserialized_has_bbox(const GSERIALIZED *gser)
+{
+       return FLAGS_GET_BBOX(gser->flags);
+}
+
+int gserialized_has_z(const GSERIALIZED *gser)
+{
+       return FLAGS_GET_Z(gser->flags);
+}
+
+int gserialized_has_m(const GSERIALIZED *gser)
+{
+       return FLAGS_GET_M(gser->flags);
+}
+
 uint32_t gserialized_get_type(const GSERIALIZED *s)
 {
        uint32_t *ptr;
index 6d63fd5a706f2fbe4cb33df51b868299ead7a614..155a00f4ea22374253aaa1d423d00570fe96beb1 100644 (file)
@@ -621,7 +621,22 @@ extern void gserialized_set_srid(GSERIALIZED *g, int32_t srid);
 * is zero, will not catch collections of empty, eg: 
 * GEOMETRYCOLLECTION(POINT EMPTY) 
 */
-int gserialized_is_empty(const GSERIALIZED *g);
+extern int gserialized_is_empty(const GSERIALIZED *g);
+
+/**
+* Check if a #GSERIALIZED has a bounding box without deserializing first.
+*/
+extern int gserialized_has_bbox(const GSERIALIZED *gser);
+
+/**
+* Check if a #GSERIALIZED has a Z ordinate.
+*/
+extern int gserialized_has_z(const GSERIALIZED *gser);
+
+/**
+* Check if a #GSERIALIZED has an M ordinate.
+*/
+extern int gserialized_has_m(const GSERIALIZED *gser);
 
 /**
 * Call this function to drop BBOX and SRID