Working with USGS Heightmap Data

The data that I download from USGS is 32 bit floating point data. What’s the correct procedure for dealing with USGS data? Should I step it down to 16 bit or 8 bit? Does it require tonemapping?

When I bring it in as-is, the terrain doesn’t look correct. But when I “Equalize” the histogram in Photoshop (Image > Adjustments > Equalize), and save as a 16 bit file, the terrain looks better–but I’m unsure if it’s entirely accurate. Accuracy is important with the project I’m working on.

Thank you!
Michael

The only thing I can think of is the colour space the original file is saved in. Linear vs sRGB or something. I have no clue in what colour space WM works, but I assume you can create files with a known colour space to test this, and thus reverse engineer what colour space the original file has.

Hopefully this is the issue, and you’ll be able to solve it, keep us posted!

@Michael_Swartz If you can convert it into a “Raster 32bit exr, in linear colorspace”, then you can import it “almost” accurately. I say “almost” because I’m not sure, there must be “some” conversion necessary, after all EXR is not a pure “Raw” format.

@HYLK World machine internally work with in 32 bit raw linear pixel data. For imports, WM imports “Heightmaps” or “Grayscale” in linear fashion, no conversion (gamma=1). For RGB data, the default colorspace is srgb. You can of course change this default behavior if you want, and even after import there’s a “gamma” node for colorspace conversions inline. Same for outputs.

Why would you step down to 16 bit or worse 8? …and lose all the details.
32 tiff and EXRs always work flawlessly , they are always Raw correct data Greyscale but I suppose Srgb converted would work as well, you should also download the 1meter Lidar if the area you want is available, they are 10Kx10K Tifs.
You get the highest amount of detail to date. Don’t use old SRTM 1/3 arc second.
Do not erode the terrain if you need accuracy.
As for the correct height is better to confirm with the location elevation and the final software package.

1 Like

2 Likes

Thanks Damaggio, I must be importing this incorrectly. When I choose the “File Input” generator, and select “heightfield” as the file type, I get a series of lines, rather than the terrain. Any suggestions? What am I missing here?

Sorry Michael, I don’t know your file information. Try to reduce and upload here.

Thank you for taking a look. I realize that it’s been parsed to 16 bit (I’m waiting for the GIS team to resend as 32 bit), but I’m not sure why the bands appear.

https://clarkuedu-my.sharepoint.com/:i:/g/personal/miswartz_clarku_edu/EXZQvfzs6CtPu5YQiGR7WRAB-GoJJiBkxnNwvcUY1tlSSQ?e=wPc5ur

for some reason i’m getting the same results but after increasing the exposure and resaving the file it loaded correctly in WM…here’s a quick look

1 Like

It also worked after I converted to srgb in Photoshop.

1 Like

Thanks for trying it out! It must be something to do with the way the TIF file was saved and sent to me. When I re-export as PNG, it’s fine. When I re-export as EXR, it’s fine.

Thank you so much for helping me trouble-shoot this and to everyone else for taking a look at the issue. What an awesome community!

-Michael

Wonderful, have a great success with it.

1 Like

@damaggio The original tif was a “geotiff”, whereas once you edited and resaved it it got converted to a regular “raster” tiff.

Geotiffs from a GIS software aren’t supported by wm (yet?), you need to have flattenned raster heightmaps, Tiff or EXR holds the highest quality.

1 Like

What tools do you recommend for managing the conversion from geotiff to a linear 32 bit TIF?

Also, any recommendations on where to access high quality (1 m LiDAR) data of Mexico?

Thank you!

Lidar is very difficult to find outside the USA but do let us know if you come across.

Most GIS data processing programs like Global Mapper, or qgis, support geotiffs and can export to raster regular tiffs. But you can do it with photoshop too, it can open a Geotiff file, but it’s going to ignore the georeferencing data, so the saved Tiff or exr is always going to be raster.

If you prefer commandline conversion, there’s a method using Gdal explained here: raster - Converting .geotiff to .tiff - Geographic Information Systems Stack Exchange

1 Like

I just found out this free open source program for GIS data conversion (uses GDAL). Haven’t tested it yet, but maybe it helps!

1 Like

Thank you! This is very helpful. I’ve been trying to learn some things in QGIS, but I am at the “foot of the mountain” with the learning process.

1 Like

+1 for this. I used GRASS extensively when I was doing my Relief Maps projects. It’s a powerful little tool. If you’re willing to be patient with it, you can do some wild things that I previously wouldn’t have believed possible. I also found it more approachable than software like qgis (which does also have GRASS built in). So there are a couple options for working with height data, and you can choose based on what workflow meshes best with your work mentality.

1 Like