Definition at line 55 of file lwgeom_box3d.c.
56{
57 char *
str = PG_GETARG_CSTRING(0);
58 int nitems;
62
63 if (strstr(
str,
"BOX3D(") !=
str)
64 {
65 pfree(box);
66 elog(ERROR, "BOX3D parser - doesn't start with BOX3D(");
67 PG_RETURN_NULL();
68 }
69
71 "BOX3D(%le %le %le ,%le %le %le)",
78 if (nitems != 6)
79 {
80 nitems = sscanf(
str,
"BOX3D(%le %le ,%le %le)", &box->
xmin, &box->
ymin, &box->
xmax, &box->
ymax);
81 if (nitems != 4)
82 {
83 pfree(box);
84 elog(
85 ERROR,
86 "BOX3D parser - couldn't parse. It should look like: BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax)");
87 PG_RETURN_NULL();
88 }
89 }
90
92 {
93 float tmp = box->
xmin;
96 }
98 {
99 float tmp = box->
ymin;
102 }
104 {
105 float tmp = box->
zmin;
108 }
110 PG_RETURN_POINTER(box);
111}
#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.