Open lmmarsano opened 5 years ago
Since you don't specify a src_crs
, it is using a Geodetic projection as source. In Geodetic, the path between the first two points is the closest path in spherical terms, which is one going through the poles. We can see that (as opposed to PlateCarree) in this plot:
So, since your input is essentially a loop around the poles, for a default Orthographic with central longitude of 0, the result is right around the boundary.
Due to #589, the boundary is slightly smaller than your line string, so it is clipped. There have been a few fixes to projections, so maybe that could be reverted, but that shrunk boundary fixed a lot of weird polygon issues. I don't know if reverting that change is possible or not.
Thanks. The original issue actually occurred when transforming from a PlateCarree CRS (I oversimplified, sorry). I've updated my branch to include that test case and fail from both source CRSs. Please refer to lmmarsano/cartopy@8bf9e18
Should this other test case also fail?
Well, since you changed +/-90 to +/-91, it's definitely true that the Geodetic should fail since it's completely outside the default Orthographic limits: I'm not sure about PlateCarree; it might be related to #116.
Due to #589, the boundary is slightly smaller than your line string, so it is clipped. There have been a few fixes to projections, so maybe that could be reverted, but that shrunk boundary fixed a lot of weird polygon issues. I don't know if reverting that change is possible or not.
So @pelson, do you think this can be reverted? It seems pretty stable without the 0.99999, but I'm not sure how you concluded that would be the right fix.
So @pelson, do you think this can be reverted? It seems pretty stable without the 0.99999, but I'm not sure how you concluded that would be the right fix.
I'm not against it. The geometry transformation pipeline has undergone a significant amount of refinement over the last 3 years, so it is plausible that it is no longer necessary.
Description
geoplot gives a
ValueError: Failed to determine the required bounds in projection coordinates.
message whose root cause traces tocartopy.crs.Orthographic.project_geometry
returning an empty geometry. The unit test added in my branch exemplifies the problem. Isproject_geometry
correct to return an empty geometry in such circumstances?Code to reproduce
Refer to lmmarsano/cartopy@9b133e3
Traceback
Full environment definition
### Operating system WSL (Ubuntu 18.10) ### Cartopy version v0.16.0 ### pip list ``` -r requirements/default.txt -r requirements/tests.txt Cython ```