Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bscholer/gdalwarp-testing
Some (hacky) testing to figure out how gdalwarp handles epochs and tectonic transformations
https://github.com/bscholer/gdalwarp-testing
Last synced: about 1 month ago
JSON representation
Some (hacky) testing to figure out how gdalwarp handles epochs and tectonic transformations
- Host: GitHub
- URL: https://github.com/bscholer/gdalwarp-testing
- Owner: bscholer
- Created: 2024-05-31T16:09:24.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-31T18:33:28.000Z (8 months ago)
- Last Synced: 2024-12-17T01:25:02.354Z (about 1 month ago)
- Language: Python
- Size: 1.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `gdalwarp` Testing
As part of a @dronedeploy project, I needed to test to see how different versions `gdalwarp` handle tectonic transformations.
# Running it
With `docker` installed, just run `make` and it'll take care of the rest!# Conclusions
_With `gdal 3.10.0, proj 9.5.0`_TL;DR: The only way to do tectonic transformations with `gdalwarp` appears to be by adding `step proj=set v_4=` to a manually provided proj string, which can be passed in via `-ct`.
Typically, when transforming coordinates via `pyproj`, you'd create a `Transformer`, and then use it to transform your coordinates. When creating the `Transformer`, you can specify the target epoch, however, you can't specify the source epoch. Then, when calling `.transform()` on the `Transformer`, you specify the `x`, `y`, `z`, and `t`, where `t` is the source epoch.
This means that the proj pipeline definition only includes the target epoch. The problem is that `gdalwarp`'s `-ct` parameter overrides (as demonstrated by this test) `-s_srs`, `-t_srs`, `-s_coord_epoch`, and `-t_coord_epoch`. This means that to specify a source epoch, which is necessary, you must add `step proj=set v_4=` to the beginning of the proj pipeline definition, which manually overrides the `t` parameter for transformations.