[PROJ] Converting coordinates between different ellipsoids... possible? valid?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PROJ] Converting coordinates between different ellipsoids... possible? valid?

Nyall Dawson
Hey list,

If I attempt to create a transform using proj_create_crs_to_crs, with
the source proj string "+proj=longlat +datum=WGS84 +no_defs" and dest
proj string "+proj=longlat +a=2632345 +no_defs", I get the error
"internal_proj_create_operations: Source and target ellipsoid do not
belong to the same celestial body".

My question is -- should this be allowed? It worked ok in previous
proj versions, and it's a common situation in QGIS which I'm having
issues fixing after the v6 port.

Or is it violating some rule of transformation? How can I reproduce
the proj 4 behaviour here?

Cheers,
Nyall
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Converting coordinates between different ellipsoids... possible? valid?

Kristian Evers-2
Nyall,

This is basically the same question as you asked a few months ago:

Not sure exactly what celestial body you are trying to map this time,
but the problem remains the same: WGS84 is a CRS belonging to Earth,
that can’t meaningfully be transformed to a CRS on another
planet/moon/asteroid/whatever.

You can convert between different ellipsoids but does it make sense when one
has a radius 3 times larger than the other? Anyway, here’s how:

echo 12 56 0 0 | cct +proj=pipeline +step +proj=cart +ellps=WGS84 +step +proj=cart +R=2632345 +inv
12.0000000000   55.8213634673  3731132.8860        0.0000

Notice the height of the original point flying 3700 km above the ground on
the new ellipsoid.

Can you explain in which scenarios you need to do the transformation
you are asking for? That might make it easier to advise you.

/Kristian

On 20 May 2019, at 05:15, Nyall Dawson <[hidden email]> wrote:

Hey list,

If I attempt to create a transform using proj_create_crs_to_crs, with
the source proj string "+proj=longlat +datum=WGS84 +no_defs" and dest
proj string "+proj=longlat +a=2632345 +no_defs", I get the error
"internal_proj_create_operations: Source and target ellipsoid do not
belong to the same celestial body".

My question is -- should this be allowed? It worked ok in previous
proj versions, and it's a common situation in QGIS which I'm having
issues fixing after the v6 port.

Or is it violating some rule of transformation? How can I reproduce
the proj 4 behaviour here?

Cheers,
Nyall
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj


_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Converting coordinates between different ellipsoids... possible? valid?

Even Rouault-2
In reply to this post by Nyall Dawson
On lundi 20 mai 2019 13:15:55 CEST Nyall Dawson wrote:

> Hey list,
>
> If I attempt to create a transform using proj_create_crs_to_crs, with
> the source proj string "+proj=longlat +datum=WGS84 +no_defs" and dest
> proj string "+proj=longlat +a=2632345 +no_defs", I get the error
> "internal_proj_create_operations: Source and target ellipsoid do not
> belong to the same celestial body".
>
> My question is -- should this be allowed? It worked ok in previous
> proj versions, and it's a common situation in QGIS

Not for real world use cases, but for some artificial unit cases, right ?

> Or is it violating some rule of transformation? How can I reproduce
> the proj 4 behaviour here?

I think we discussed this before. Basically there's a new check that prevents
doing non sensical transformations. No workaround than disabling the check in
code

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Converting coordinates between different ellipsoids... possible? valid?

Nyall Dawson
On Mon, 20 May 2019 at 17:45, Even Rouault <[hidden email]> wrote:

>
> On lundi 20 mai 2019 13:15:55 CEST Nyall Dawson wrote:
> > Hey list,
> >
> > If I attempt to create a transform using proj_create_crs_to_crs, with
> > the source proj string "+proj=longlat +datum=WGS84 +no_defs" and dest
> > proj string "+proj=longlat +a=2632345 +no_defs", I get the error
> > "internal_proj_create_operations: Source and target ellipsoid do not
> > belong to the same celestial body".
> >
> > My question is -- should this be allowed? It worked ok in previous
> > proj versions, and it's a common situation in QGIS
>
> Not for real world use cases, but for some artificial unit cases, right ?
>
> > Or is it violating some rule of transformation? How can I reproduce
> > the proj 4 behaviour here?
>
> I think we discussed this before. Basically there's a new check that prevents
> doing non sensical transformations. No workaround than disabling the check in
> code

Thanks for the direction (not being sarcastic, you definitely pointed
fingers back at the non-proj code being at fault, which it was).  This
invalid transform was the result of some no-longer-correct assumptions
that crs objects can always be represented by a proj string or unique
auth/code combo.

Nyall

>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj