code: public static Geometry addZ(Geometry geometry, double z) throws SQLException {
          if(geometry == null){
              return null;
          }
          geometry.apply(new AddZCoordinateSequenceFilter(z));
          return geometry;
      }
docs: Add a z with to the existing value (do the sum). NaN values are not
  updated.
  
  @param geometry
  @param z
  @return
  @throws java.sql.SQLException