(1) firstly, the red line is converted into an area file, and the feature is transformed into a polygon,
② Use the spatial analysis tool in the toolbox-Extract-Extract by Mask.
③ Set the input grid selection grid diagram (JGP) in ③ extraction by mask.
The mask data selects the area into which the red line is converted.