Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing converter for astropy.coordinates.representation.geodetic #182

Open
braingram opened this issue May 23, 2023 · 1 comment
Open

Comments

@braingram
Copy link
Contributor

There does not appear to be a converter for the following

WGS84GeodeticRepresentation
WGS72GeodeticRepresentation
GRS80GeodeticRepresentation

Now found in astropy.coordinates.representation.geodetic
https://github.com/astropy/astropy/blob/9ec5277724150ea178282f5dfbd9ca8782f89021/astropy/coordinates/representation/geodetic.py#L103-L121

This causes the current test suite to fail as discussed in this PR:
#181

@braingram
Copy link
Contributor Author

Running the following with:

  • asdf-astropy 0.4.0
  • astropy 5.2.2
import asdf
import astropy.units as u
import astropy.coordinates.earth

r = astropy.coordinates.earth.WGS84GeodeticRepresentation(lat=0 * u.rad, lon=0 * u.rad, height=0 * u.m)
asdf.AsdfFile({'r': r}).write_to('foo.asdf')

fails with

yaml.representer.RepresenterError: ('cannot represent an object', <WGS84GeodeticRepresentation (lon, lat, height) in (rad, rad, m)
    (0., 0., 0.)>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant