NeoGeographyToolkit / StereoPipeline

The NASA Ames Stereo Pipeline is a suite of automated geodesy & stereogrammetry tools designed for processing planetary imagery captured from orbiting and landed robotic explorers on other planets.
Apache License 2.0
479 stars 169 forks source link

Set DEM sampling in geodiff #242

Open adehecq opened 5 years ago

adehecq commented 5 years ago

geodiff generate the output on the same grid as the first DEM. Would it be possible to add an option to either generate the output in the same grid as the second DEM instead, or probably easier, switch the sign of the difference? This way one could independently set the sign of the difference and the output resolution.

oleg-alexandrov commented 5 years ago

This should be easy enough. In fact, we already do it that way when we diff between a dem and a csv in that tool. Regardless of the order they are passed in, one subtacts the csv from the dem as it is easy to interpolate that way, and then the sign is flipped if necessary. Hope to get to it soon.

For now you can specify the order in the reverse, and then use image_calc to flip the sign. It should hopefully work like this: image_calc input.tif -c "-VAR_0" -o output.tif but the doc has the exact syntax.

adehecq commented 5 years ago

Great ! And I didn't know the image_calc tool, but I guess it's pretty similar to gdal_calc.

Two less important suggestions about geodiff that came to my mind as well: