point2dem --x-offset

14 views
Skip to first unread message

Amaury Dehecq

unread,
Sep 21, 2022, 9:29:41 AM9/21/22
to Ames Stereo Pipeline Support
Hi Oleg,

I'm wondering, what is the behavior of point2dem --x-offset option? Does it apply the offset in the output coordinate system or in the PC system (i.e. ECEF)?

Once I generate my DEM, I estimate a subpixel horizontal shift, using the algorithm of Nuth & Kaab, 2011 (https://doi.org/10.5194/tc-5-271-2011). I was thinking that I could apply this shift to the point cloud before doing the gridding, which would avoid spreading nodata values. The shift is calculated in the DEM grid. Do you think that could work?

Thanks,
Amaury

Amaury Dehecq

unread,
Sep 21, 2022, 9:48:57 AM9/21/22
to Ames Stereo Pipeline Support
I tried a quick test by applying an offset of 24 (assumed meters) and the output DEM is shifted by 7 degrees ! Obviously, it's not in the DEM coordinates system, but also probably not in ECEF...

Oleg Alexandrov

unread,
Sep 21, 2022, 12:14:05 PM9/21/22
to Amaury Dehecq, Ames Stereo Pipeline Support
As I see in the code (this is very old code) the --x-offset is in longitude units (in degrees), the --y-offset is latitude (also in degrees), and there's also the --z-offset (in meters). I now updated the code and doc to reflect that. 

To apply an ECEF translation, you can use the pc_align tool to create a point cloud from a DEM (or start with the input PC), with zero iterations, then apply a given ECEF translation transform, again with pc_align with 0 iterations, then use point2dem. To do shifts in projected units on a DEM, one can use gdalwarp (with cubic interpolation).


--
You received this message because you are subscribed to the Google Groups "Ames Stereo Pipeline Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ames-stereo-pipeline...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/cb9a9c89-9822-4bcb-a4ac-dc1373ab732fn%40googlegroups.com.

Amaury Dehecq

unread,
Sep 23, 2022, 8:22:13 AM9/23/22
to Ames Stereo Pipeline Support
Good to know and thanks for updating the doc!
Yes, I know I can apply a shift on the DEM directly with GDAL, but this can cause loss near the edges of nodata values. If one shifts the point cloud instead, there is no data loss. But that's minor. Another option is to apply the shift to the raster's georeferences rather than the data itself.

Amaury
Reply all
Reply to author
Forward
0 new messages