The actual file is too big for RageMP, and is instead hosted on Git LFS. You can get it from my Github repository at
entity.getHeight(X, Y, Z, atTop, inWorldCoords);
This is not perfect, and I'm pretty sure that there exists proper height maps that would produce the same or something of higher quality.
All heights are within a bounded box with a lower left point and upper right point in world coordinates:
LOWER LEFT: (-4100,-4300)
UPPER RIGHT: (4300, 7825)
This covers the land of San Andreas and must of the surrounding waters.
Beaware that some heights might be 0, but my experience is that this is only a few of them.
float height = GetHeightAtXY(goto.X, goto.Y);
NAPI.Entity.SetEntityPosition(ply, new Vector3(goto.X, goto.Y, height));