OK, I was confusing myself some in that last reply. this.x/this.y is the location of the corner of that terrain section in world coordinates. In the example, the sections are 800 X 800 so the corner of the first section at (0,0) ie (gridX, gridY) is at world coordinates (0,0). If you had another section next to it, it would be at (1,0) located at world coordinates(800,0). To determine where you are standing on a given terrain section, you would subtract your (x,y) world coordinates from the section's world coordinates that you are on.
public float getHeightOfTerrain(float worldX, float worldZ)
{
float terrainX= worldX - this.x;
float terrainZ = worldZ - this.z;
So you pass in your players world coordinates and it subtracts the size of the this.x/this.y of the terrain section to determine exactly where you are on that that section. If you were on section (0,0) then nothing is changed. If you were on section (1,0) then it would subtract (800,0) from the players location. So if your player was at world coordinates (1200,400), then it would work out (1200 - 800, 400 - 0) thus you are on (400,400) of that section (1,0)
Hope this helps. I'm going to implement this in my engine. 
BTW, gridX/gridY are set from the parameters for the constructor of terrain.