From c657a753585597e04ebea6e42623af99e35759ba Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 22 Sep 2004 15:15:51 +0000 Subject: [PATCH] lw_findlength function made statics of lwgeom_api.c. public functions with those names should accept LW pointers instead.. git-svn-id: http://svn.osgeo.org/postgis/trunk@878 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom.h | 28 +++++++--------------------- lwgeom/lwgeom_api.c | 12 ++++++------ 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/lwgeom/lwgeom.h b/lwgeom/lwgeom.h index c21196a03..98fda247f 100644 --- a/lwgeom/lwgeom.h +++ b/lwgeom/lwgeom.h @@ -1,6 +1,5 @@ //lwgeom.h - // basic API for handling the LWGEOM, BOX2DFLOAT4, LWPOINT, LWLINE, and LWPOLY. // See below for other support types like POINTARRAY and LWGEOM_INSPECTED @@ -204,14 +203,13 @@ WHERE // already defined in postgis.h - - #define POINTTYPE 1 - #define LINETYPE 2 - #define POLYGONTYPE 3 - #define MULTIPOINTTYPE 4 - #define MULTILINETYPE 5 - #define MULTIPOLYGONTYPE 6 - #define COLLECTIONTYPE 7 +#define POINTTYPE 1 +#define LINETYPE 2 +#define POLYGONTYPE 3 +#define MULTIPOINTTYPE 4 +#define MULTILINETYPE 5 +#define MULTIPOLYGONTYPE 6 +#define COLLECTIONTYPE 7 /* * This is the binary representation of lwgeom compatible @@ -286,10 +284,6 @@ extern void lwline_serialize_buf(LWLINE *line, char *buf, int *size); // find bounding box (standard one) zmin=zmax=0 if 2d (might change to NaN) extern BOX3D *lwline_findbbox(LWLINE *line); - -//find length of this serialized line -extern uint32 lwline_findlength(char *serialized_line); - //-------------------------------------------------------- typedef struct @@ -323,9 +317,6 @@ extern BOX3D *lwpoint_findbbox(LWPOINT *point); extern POINT2D lwpoint_getPoint2d(LWPOINT *point); extern POINT3D lwpoint_getPoint3d(LWPOINT *point); -//find length of this serialized point -extern uint32 lwpoint_findlength(char *serialized_point); - //-------------------------------------------------------- //DONT MIX 2D and 3D POINTS! *EVERYTHING* is either one or the other @@ -360,11 +351,6 @@ extern void lwpoly_serialize_buf(LWPOLY *poly, char *buf, int *size); // find bounding box (standard one) zmin=zmax=0 if 2d (might change to NaN) extern BOX3D *lwpoly_findbbox(LWPOLY *poly); - -//find length of this serialized polygon -extern uint32 lwpoly_findlength(char *serialized_line); - - //------------------------------------------------------ // Multi-geometries diff --git a/lwgeom/lwgeom_api.c b/lwgeom/lwgeom_api.c index 96337fa78..ed4c09499 100644 --- a/lwgeom/lwgeom_api.c +++ b/lwgeom/lwgeom_api.c @@ -16,6 +16,9 @@ #include "lwgeom.h" +// this will change to NaN when I figure out how to +// get NaN in a platform-independent way +#define NO_Z_VALUE 0.0 //#define DEBUG 1 //#define DEBUG_EXPLODED 1 @@ -27,12 +30,9 @@ extern BOX3D *lw_geom_getBB_simple(char *serialized_form); #ifdef DEBUG_EXPLODED void checkexplodedsize(char *srl, LWGEOM_EXPLODED *exploded, int alloced, char wantbbox); #endif - - -// this will change to NaN when I figure out how to -// get NaN in a platform-independent way - -#define NO_Z_VALUE 0.0 +static uint32 lwline_findlength(char *serialized_line); +static uint32 lwpoint_findlength(char *serialized_point); +static uint32 lwpoly_findlength(char *serialized_line); //********************************************************************* -- 2.40.0