public static Geometry translate(Geometry geom, double x, double y, double z) {
        if (geom == null) {
            return null;
        }
        final CoordinateSequenceDimensionFilter filter =
                new CoordinateSequenceDimensionFilter();
        geom.apply(filter);
        checkMixed(filter);
        // For all 2D geometries, we only translate by (x, y).
        if (filter.is2D()) {
            return AffineTransformation.translationInstance(x, y).transform(geom);
        } else {
            final Geometry clone = geom.copy();
            clone.apply(new ZAffineTransformation(x, y, z));
            return clone;
        }
    }
public static Geometry translate ( Geometry geom , double x , double y , double z ) { if ( geom == null ) { return null ; } final CoordinateSequenceDimensionFilter filter = new CoordinateSequenceDimensionFilter ( ) ; geom . apply ( filter ) ; checkMixed ( filter ) ; if ( filter . is2D ( ) ) { return AffineTransformation . translationInstance ( x , y ) . transform ( geom ) ; } else { final Geometry clone = geom . copy ( ) ; clone . apply ( new ZAffineTransformation ( x , y , z ) ) ; return clone ; } }
Translates a geometry using X, Y and Z offsets.

@param geom Geometry
@param x    X
@param y    Y
@param z    Z
@return Translated geometry