2939 GSERIALIZED *geom_scale = PG_GETARG_GSERIALIZED_P(1);
2941 LWGEOM *lwg, *lwg_scale, *lwg_origin;
2942 LWPOINT *lwpt_scale, *lwpt_origin;
2945 bool translate =
false;
2955 PG_FREE_IF_COPY(geom_scale, 1);
2956 lwpgerror(
"Scale factor geometry parameter must be a point");
2961 geom = PG_GETARG_GSERIALIZED_P_COPY(0);
2969 PG_FREE_IF_COPY(geom_scale, 1);
2970 PG_RETURN_POINTER(geom);
2981 if (PG_NARGS() > 2 && !PG_ARGISNULL(2))
2983 geom_origin = PG_GETARG_GSERIALIZED_P(2);
2993 PG_FREE_IF_COPY(geom_origin, 2);
3000 memset(&aff, 0,
sizeof(
AFFINE));
3004 aff.
xoff = -1 * origin.
x;
3005 aff.
yoff = -1 * origin.
y;
3006 aff.
zoff = -1 * origin.
z;
3024 PG_FREE_IF_COPY(geom, 0);
3025 PG_FREE_IF_COPY(geom_scale, 1);
3026 PG_RETURN_POINTER(ret);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
void lwgeom_free(LWGEOM *geom)
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
void lwgeom_scale(LWGEOM *geom, const POINT4D *factors)
LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
void lwgeom_affine(LWGEOM *geom, const AFFINE *affine)
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)