<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Daven,</p>
<p>finding the right parameters is always a bit tricky. For example,
for meteorological data, there are at least 2 different
conventions to express angles.</p>
<p>See PROJ_WKT2_NAME_METHOD_POLE_ROTATION_GRIB_CONVENTION and
PROJ_WKT2_NAME_METHOD_POLE_ROTATION_NETCDF_CF_CONVENTION at
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/PROJ/blob/ae3180303d974653b126bc65dcfdad3cecb5a313/src/iso19111/operation/conversion.cpp#L3783">https://github.com/OSGeo/PROJ/blob/ae3180303d974653b126bc65dcfdad3cecb5a313/src/iso19111/operation/conversion.cpp#L3783</a>
where there's a mapping from south pole / north pole conventions
to +proj=ob_tran. Setting lon_0 is often necessary.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 09/11/2022 à 13:00, DAVEN P QUINN
via PROJ a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:9627f494-7924-468e-a29f-204a2343234a@Spark">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<div name="messageBodySection">
<div dir="auto">Hello all,<br>
<br>
I’m a geologist who is working with paleogeographic
reconstructions (see example <a
href="https://davenquinn.com/viz/corelle-demo-pbdb/?time=295"
target="_blank" moz-do-not-send="true">here</a>). These
require composite reproductions where different parts of a
feature dataset (continents) are rotated with different
axis-angle transformations. I’ve had good luck doing these
rotations with quaternion math in the browser/Python
environments, but I am now trying to use Proj transformations
in order to apply rotations directly within PostGIS queries.<br>
<br>
<span style="color:var(--textColor)">This </span><a
href="https://pbs.twimg.com/media/Fgpx4UGXEAQmPOt?format=jpg&name=4096x4096"
target="_blank" moz-do-not-send="true">linked image</a> <span
style="color:var(--textColor)">shows the desired result, a
plate reconstruction to 250 Ma with a different rotation
applied to each plate. This was produced by applying the
desired quaternions through pl/pgsql math. Moving this math
to Proj internals would result in a ~50-100x speedup.</span><br>
<br>
The tool that seems most fitting is the `ob_trans` family of
projections, but I have been unable to define a rotation that
can handle my preferred representation (a pole defined in
Lon-lat coordinates and an associated angle of rotation around
it). From my reading of the docs, I believe the `o_lon_c`,
`o_lat_c` and `o_alpha` parameters should do this, but I
cannot get them to work reliably. In fact, I can’t even
reliably define a ’no-op’ transformation that leaves
coordinates unchanged. Perhaps I have the angular coordinate
system wrong, or the rotation is being done in Cartesian space
even though `proj=lonlat` is used.<br>
<br>
Is it possible to define an arbitrary spherical spatial
rotation in Proj transformations? Maybe I need to use
pipelines instead? I’d appreciate any guidance! More details
below the fold...<br>
<br>
Regards,<br>
<br>
<strong>Daven P. Quinn</strong><br>
Research scientist II · <em>U of Wisconsin Madison</em><br>
PhD · structural geology · <em>Caltech</em> ‘18<br>
<a href="https://davenquinn.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://davenquinn.com</a><br>
+1 704 920 8487<br>
<br>
-------------<br>
<br>
Here is an example of the pl/pgsql I am currently using to
assemble a projection (I have gone through many iterations
testing different offsets and the different ways to specify
the transformation):<br>
```<br>
RETURN '+proj=ob_tran +o_proj=longlat +o_alpha=' ||
pi()/2+angle || 'r +o_lon_c=' || pi()/2+lon || 'r +o_lat_c='
|| lat || 'r' proj<br>
```<br>
where (lat, lon, angle) defines a rotation pole.<br>
<br>
This results in some geometries (with a fortuitous set of
poles, I guess) attaining ballpark-correct transformations
while other features are shifted far outside of their origin
tiles.</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>