pyresample
                                
                                 pyresample copied to clipboard
                                
                                    pyresample copied to clipboard
                            
                            
                            
                        `__contains__`, `overlaps`, `overlap_rate`, `intersection`, `get_area` methods provide errors/wrong results for geos AreaDef / SwathDef
Problem description
The methods __contains__, overlaps, overlap_rate, intersection, contains, get_area  implemented in BaseDefinition class employs a polygon defined by the centroid of the pixel corners of the SwathDef / AreaDef to perform the geometrical computations.
While this works correctly for many classical AreaDefinition, for:
- Geostationary AreaDef all methods crash (because of Inf values at the corners) (see also #393, #268) 3https://github.com/pytroll/pyresample/issues/393
- SwathDefinition, the corners of lats/lons arrays does not provide meaningful values in the case of ascending and descending orbits within SwathDefinition ...
Code example for GEO AreaDef
import satpy
geometry_def = satpy.resample.get_area_def("goes_east_abi_f_1km")
geometry_def.corners   # --> Illegal (lon, lat) coordinates: (inf, inf)
geometry_def.outer_boundary_corners # --> Illegal (lon, lat) coordinates: (inf, inf)
geometry_def.get_area() # --> Illegal (lon, lat) coordinates: (inf, inf)
geometry_def.overlaps(geometry_def) # --> Illegal (lon, lat) coordinates: (inf, inf)
geometry_def.overlap_rate(geometry_def) # --> Illegal (lon, lat) coordinates: (inf, inf)
geometry_def.intersection(geometry_def) # --> Illegal (lon, lat) coordinates: (inf, inf)
(10,20) in geometry_def # __contains__ method  # --> Illegal (lon, lat) coordinates: (inf, inf)
Proposed solution:
- [ ] Definition of boundarymethod for SwathDefinition and AreaDefinition to retrieveAreaBoundaryclass
- [ ] Definition of SphPolygonfromAreaBoundaryusingself.polygon()
- [ ] Enhancement of spherical.py geometrical operations
- [ ] Upgrade of BaseDefinitionmethods to useself.boundary().polygon().<method>(...)
Draft PR coming in the next days ...
In your "see also" you referred once to #268 and twice to #393. Was there a third issue you meant to link?