LibGdx - perline noise

Hi,

I’ve generated a map of 2000x1000 tiles (tile size 32x32). The map is scrollable in all directions (I only draw what the camera sees).

I want to use perlin noise to generate heights for my tiles, such as this ascii example:

G - grass, D - dirt, S - stone

G              GGG

GGG GGGGGG GG
GGGGGGGGGGGGGGGGGGG
GDDDGDDDDGGGGGGGDDG
DDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDD
DSDDDDDDDSDDDDDDSSDD
SSSSSSSSSSSSSSSSSSSSSS
SSSSSSSSSSSSSSSSSSSSSS

How do you apply perlin noise to achieve such a thing like the above?

Any advice is appreciated,

Thanks