Definition at line 56 of file lwgeom_box3d.c.
57{
58 char *
str = PG_GETARG_CSTRING(0);
59 int nitems;
63
64 if (strstr(
str,
"BOX3D(") !=
str)
65 {
66 pfree(box);
67 elog(ERROR, "BOX3D parser - doesn't start with BOX3D(");
68 PG_RETURN_NULL();
69 }
70
72 "BOX3D(%le %le %le ,%le %le %le)",
79 if (nitems != 6)
80 {
81 nitems = sscanf(
str,
"BOX3D(%le %le ,%le %le)", &box->
xmin, &box->
ymin, &box->
xmax, &box->
ymax);
82 if (nitems != 4)
83 {
84 pfree(box);
85 elog(
86 ERROR,
87 "BOX3D parser - couldn't parse. It should look like: BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax)");
88 PG_RETURN_NULL();
89 }
90 }
91
93 {
94 float tmp = box->
xmin;
97 }
99 {
100 float tmp = box->
ymin;
103 }
105 {
106 float tmp = box->
zmin;
109 }
111 PG_RETURN_POINTER(box);
112}
#define SRID_UNKNOWN
Unknown SRID value.
References BOX3D::srid, SRID_UNKNOWN, str, BOX3D::xmax, BOX3D::xmin, BOX3D::ymax, BOX3D::ymin, BOX3D::zmax, and BOX3D::zmin.