(geom, xfact=1.0, yfact=1.0, zfact=1.0, origin='center')
return affine_transform(geom, matrix)
Returns a scaled geometry, scaled by factors along each dimension.

    The point of origin can be a keyword 'center' for the 2D bounding box
    center (default), 'centroid' for the geometry's 2D centroid, a Point
    object or a coordinate tuple (x0, y0, z0).

    Negative scale factors will mirror or reflect coordinates.

    The general 3D affine transformation matrix for scaling is:

        / xfact  0    0   xoff \ 
        |   0  yfact  0   yoff |
        |   0    0  zfact zoff |
        \   0    0    0     1  /

    where the offsets are calculated from the origin Point(x0, y0, z0):

        xoff = x0 - x0 * xfact
        yoff = y0 - y0 * yfact
        zoff = z0 - z0 * zfact
Returns a scaled geometry, scaled by factors along each dimension.
Returns a scaled geometry scaled by factors along each dimension .
def scale(geom, xfact=1.0, yfact=1.0, zfact=1.0, origin='center'):
    """Returns a scaled geometry, scaled by factors along each dimension.

    The point of origin can be a keyword 'center' for the 2D bounding box
    center (default), 'centroid' for the geometry's 2D centroid, a Point
    object or a coordinate tuple (x0, y0, z0).

    Negative scale factors will mirror or reflect coordinates.

    The general 3D affine transformation matrix for scaling is:

        / xfact  0    0   xoff \ 
        |   0  yfact  0   yoff |
        |   0    0  zfact zoff |
        \   0    0    0     1  /

    where the offsets are calculated from the origin Point(x0, y0, z0):

        xoff = x0 - x0 * xfact
        yoff = y0 - y0 * yfact
        zoff = z0 - z0 * zfact
    """
    x0, y0, z0 = interpret_origin(geom, origin, 3)

    matrix = (xfact, 0.0, 0.0,
              0.0, yfact, 0.0,
              0.0, 0.0, zfact,
              x0 - x0 * xfact, y0 - y0 * yfact, z0 - z0 * zfact)
    return affine_transform(geom, matrix)
def scale ( geom , xfact = 1.0 , yfact = 1.0 , zfact = 1.0 , origin = 'center' ) : x0 , y0 , z0 = interpret_origin ( geom , origin , 3 ) matrix = ( xfact , 0.0 , 0.0 , 0.0 , yfact , 0.0 , 0.0 , 0.0 , zfact , x0 - x0 * xfact , y0 - y0 * yfact , z0 - z0 * zfact ) return affine_transform ( geom , matrix )