Display topographic data as latitude, longitude and elevation?

My VTK C++ app reads GMT grid files that contain latitude/longitude (degrees) and corresponding elevation (meters) into a VtkPointArray, where x is longitude, y is latitude and z is depth. However the elevation range (z-axis) typically spans thousands of meters, while the latitude and longitude ranges span a degree or less. The resulting rendered surface is highly distorted and elongated in z, and not usable. How to properly scale z in VTK such that the rendered surface looks to scale (no vertical exaggeration), with these requirements:

  • Values on the x and y (longitude and latitude) axes are in units of degrees
  • Values on the z axis are in units of meters, and the values represent the actual elevation (not scaled values).

I realize that I can convert longitude and latitude to UTM (easting and northing meters) and the resulting render is much more realistic - but users need to be able to display longitude and latitude values on the axis.

Thanks for you help, as always!

Display your grid in UTM and only change the X Y markings to lon lat?

1 Like

But the numbers on the axis tick marks would correspond to UTM, despite the labels reading lon/lat… Any way to “convert” the numbers on tick marks from UTM to lon/lat?

Can you use setXAxisRange (Y and Z also) for vtkCubeAxesActor?

1 Like

Yes, that works! Thanks!