-
Hi everyone, I am using I get nan values in some coordinates after clipping, but I have verified that data exist in the original dataset (before clipping). Here is an example of geometry that returns a few nan values: "POLYGON((-31.486297087721766 60.87669368042079,-36.71370291227825 60.87669368042079,-36.52308966145061 58.335063073172215,-31.676910338549394 58.335063073172215,-31.486297087721763 60.87669368042079))". Here is my simple code:
Is it possible to clip data over an irregular geometry? If yes, which can be the reason why I get nan values for a few coordinates? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The output raster is always going to be a grid. The nan values are for regions of the grid that don't overlap with the shape. It sounds like you may want to use the envelope of the shape to clip to get the behavior you want. |
Beta Was this translation helpful? Give feedback.
The output raster is always going to be a grid. The nan values are for regions of the grid that don't overlap with the shape.
It sounds like you may want to use the envelope of the shape to clip to get the behavior you want.