If I would make such a project:
First I would generate a terrain with perlin noise.
I would divide the terrain into parts (chunks), for better performance and easier saving.
I determine where certain materials are located relative to the world or terrain.
Like having grass never appear below water level.
For biomes I would use a couple more noise maps that would check stuff like humidity and temperature.
For terrain modification I would allow the player to edit the noise map directly with some sort of brush, and regenerate the terrain.
With a 2d noise map, you could make complete black set to a height of 0 and complete white to a height of 100, any greys in between will get a height equal to it's grey value. So if you allow the player to draw black or white lines on the map, it would essentially be a terrain modifier.
Also don't use gridmap for terrain. It's fine, but not great when you have to constantly generate terrain.
I would suggest to generate terrain in code instead.