-
Notifications
You must be signed in to change notification settings - Fork 94
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
Allow cropping non-geos areas #516
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2587,11 +2587,9 @@ def get_area_slices(self, area_to_cover, shape_divisible_by=None): | |
return x_slice, y_slice | ||
|
||
if not self.is_geostationary: | ||
raise NotImplementedError("Source projection must be 'geos' if " | ||
"source/target projections are not " | ||
"equal.") | ||
|
||
data_boundary = Boundary(*get_geostationary_bounding_box_in_lonlats(self)) | ||
data_boundary = self.boundary(frequency=100) | ||
else: | ||
data_boundary = Boundary(*get_geostationary_bounding_box_in_lonlats(self)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we add/call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here below:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this simplification is better suited for another PR |
||
if area_to_cover.is_geostationary: | ||
area_boundary = Boundary( | ||
*get_geostationary_bounding_box_in_lonlats(area_to_cover)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the rationale for choosing
100
here? (we also hardcode it a bit laterpyresample/pyresample/geometry.py
Line 2597 in 4e245a9
frequency
herepyresample/pyresample/geometry.py
Lines 1559 to 1569 in 4e245a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We set that default just to restrict the number of vertices (several thousands)... otherwise the polygon intersection would takes too long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we want to keep the number of vertices low to speed up the process.