> Does proj4 include rotated pole and vertical perspective, for instance?
Just to have it noted that it is supported in PROJ (the conversion classes will
be released in pyproj 2.5.0 soon, but the PROJ string version works on all
versions):
```python
>>> from pyproj.crs.coordinate_operation import
>>> RotatedLatitudeLongitudeConversion, VerticalPerspectiveConversion
>>> RotatedLatitudeLongitudeConversion(o_lat_p=1, o_lon_p=2).to_proj4()
'+proj=ob_tran +o_proj=longlat +o_lat_p=1 +o_lon_p=2 +lon_0=0'
>>> VerticalPerspectiveConversion(viewpoint_height=50000).to_proj4()
'+proj=nsper +lat_0=0 +lon_0=0 +h=50000 +x_0=0 +y_0=0'
```
>From tests:
```python
crs = CRS.from_cf(
dict(
grid_mapping_name="rotated_latitude_longitude",
grid_north_pole_latitude=32.5,
grid_north_pole_longitude=170.0,
)
)
expected_cf = {
"semi_major_axis": 6378137.0,
"semi_minor_axis": crs.ellipsoid.semi_minor_metre,
"inverse_flattening": crs.ellipsoid.inverse_flattening,
"reference_ellipsoid_name": "WGS 84",
"longitude_of_prime_meridian": 0.0,
"prime_meridian_name": "Greenwich",
"horizontal_datum_name": "World Geodetic System 1984",
"grid_mapping_name": "rotated_latitude_longitude",
"grid_north_pole_latitude": 32.5,
"grid_north_pole_longitude": 170.0,
"north_pole_grid_longitude": 0.0,
}
cf_dict = crs.to_cf()
assert cf_dict.pop("crs_wkt").startswith("PROJCRS[")
assert cf_dict == expected_cf
```
```python
crs = ProjectedCRS(conversion=VerticalPerspectiveConversion(50, 0, 1, 0, 2,
3))
expected_cf = {
"semi_major_axis": 6378137.0,
"semi_minor_axis": crs.ellipsoid.semi_minor_metre,
"inverse_flattening": crs.ellipsoid.inverse_flattening,
"reference_ellipsoid_name": "WGS 84",
"longitude_of_prime_meridian": 0.0,
"prime_meridian_name": "Greenwich",
"horizontal_datum_name": "World Geodetic System 1984",
"grid_mapping_name": "vertical_perspective",
"perspective_point_height": 50.0,
"latitude_of_projection_origin": 0.0,
"longitude_of_projection_origin": 1.0,
"false_easting": 2.0,
"false_northing": 3.0,
}
cf_dict = crs.to_cf()
assert cf_dict.pop("crs_wkt").startswith("PROJCRS[")
assert cf_dict == expected_cf
```
> If it's not our own resource, we can't necessarily add to it
It is an open-source tool that accepts contributions. Are you not allowed to
contribute to other open-source projects where you work?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/cf-convention/cf-conventions/issues/222#issuecomment-589670579
This list forwards relevant notifications from Github. It is distinct from
[email protected], although if you do nothing, a subscription to the
UCAR list will result in a subscription to this list.
To unsubscribe from this list only, send a message to
[email protected].