Skip to content

Commit 582886e

Browse files
author
Benjamin Winkel
committed
bugfix/workaround geospatial docs (see astropy/astropy#11975)
1 parent b55c014 commit 582886e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎docs/geospatial/index.rst‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ output). One can specifically ask for the original units by doing::
120120

121121
>>> import pycraf.geospatial as geo
122122
>>> import astropy.units as u
123+
>>> from astropy.units.imperial import ft
123124
>>> import pyproj
124125

125126
>>> proj_wgs84 = pyproj.Proj('+init=epsg:4326')
@@ -146,11 +147,11 @@ because we can use the `~astropy.units` conversion::
146147
>>> x, y # doctest: +FLOAT_CMP
147148
(<Quantity 925806.5486332772 m>, <Quantity 216168.1432314818 m>)
148149

149-
>>> x.to(u.imperial.ft), y.to(u.imperial.ft) # doctest: +FLOAT_CMP
150+
>>> x.to(ft), y.to(ft) # doctest: +FLOAT_CMP
150151
(<Quantity 3037416.9849743457 ft>, <Quantity 709211.6499186204 ft>)
151152

152153
>>> transform = geo.transform_factory(3452, 4326)
153-
>>> transform(3037416.985 * u.imperial.ft, 709211.650 * u.imperial.ft) # doctest: +FLOAT_CMP
154+
>>> transform(3037416.985 * ft, 709211.650 * ft) # doctest: +FLOAT_CMP
154155
(<Quantity -92.10581908573734 deg>, <Quantity 30.447921938477027 deg>)
155156

156157
Unfortunately, there seems to be no way to ask `pyproj` about which

0 commit comments

Comments
 (0)