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

◆ test_gserialized2_srid()

static void test_gserialized2_srid ( void  )
static

Definition at line 104 of file cu_gserialized2.c.

105{
107 int32_t srid, rv;
108
109 srid = 4326;
110 gserialized2_set_srid(&s, srid);
112 CU_ASSERT_EQUAL(rv, srid);
113
114 srid = -3005;
115 gserialized2_set_srid(&s, srid);
117 //printf("srid=%d rv=%d\n",srid,rv);
118 CU_ASSERT_EQUAL(rv, SRID_UNKNOWN);
119
120 srid = SRID_UNKNOWN;
121 gserialized2_set_srid(&s, srid);
123 CU_ASSERT_EQUAL(rv, srid);
124
125 srid = SRID_UNKNOWN;
126 gserialized2_set_srid(&s, srid);
128 CU_ASSERT_EQUAL(rv, srid);
129
130 srid = 100000;
131 gserialized2_set_srid(&s, srid);
133 CU_ASSERT_EQUAL(rv, srid);
134}
char * s
Definition cu_in_wkt.c:23
int32_t gserialized2_get_srid(const GSERIALIZED *g)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
void gserialized2_set_srid(GSERIALIZED *g, 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 gserialized2_get_srid(), gserialized2_set_srid(), s, and SRID_UNKNOWN.

Referenced by gserialized2_suite_setup().

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