code: public static Geometry densify(Geometry geometry, double tolerance) {
          if(geometry == null){
              return null;
          }
          return Densifier.densify(geometry, tolerance);
      }
docs: Densify a geometry using the given distance tolerance.
  
  @param geometry  Geometry
  @param tolerance Distance tolerance
  @return Densified geometry