PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ test_serialized1_srid()

static void test_serialized1_srid ( void  )
static

Definition at line 121 of file cu_gserialized1.c.

122{
124 int32_t srid, rv;
125
126 srid = 4326;
127 gserialized1_set_srid(&s, srid);
129 CU_ASSERT_EQUAL(rv, srid);
130
131 srid = -3005;
132 gserialized1_set_srid(&s, srid);
134 //printf("srid=%d rv=%d\n",srid,rv);
135 CU_ASSERT_EQUAL(rv, SRID_UNKNOWN);
136
137 srid = SRID_UNKNOWN;
138 gserialized1_set_srid(&s, srid);
140 CU_ASSERT_EQUAL(rv, srid);
141
142 srid = SRID_UNKNOWN;
143 gserialized1_set_srid(&s, srid);
145 CU_ASSERT_EQUAL(rv, srid);
146
147 srid = 100000;
148 gserialized1_set_srid(&s, srid);
150 CU_ASSERT_EQUAL(rv, srid);
151}
char * s
Definition cu_in_wkt.c:23
int32_t gserialized1_get_srid(const GSERIALIZED *s)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
void gserialized1_set_srid(GSERIALIZED *s, int32_t srid)
Write the SRID into the serialized form (it is packed into three bytes so this is a handy function).
#define SRID_UNKNOWN
Unknown SRID value.
Definition liblwgeom.h:215

References gserialized1_get_srid(), gserialized1_set_srid(), s, and SRID_UNKNOWN.

Referenced by gserialized1_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: