Hi Jagadish
The PT_IN_POLY function,
yes? sh func *poly*
PT_IN_POLY(A,XVERT,YVERT)
Return -1 outside, 0 if on edge, 1 if inside polygon
A: Variable on the XY grid and region to be tested
XVERT: X-coordinates of vertices of polygon
YVERT: Y-coordinates of vertices of polygon
just needs lists of vertices. If you were going to use Ferret to
draw the outline, you'd do this kind of thing -- isn't this what you
did to draw the outlines in your first message?
So for example
yes? let xvert = {74,76,76,78,78,77,77,74,74}
yes? let yvert = {15,15,13,13,15,15,18,18,15}
yes? use etopo20
yes? shade/x=70:80/y=10:25 rose
yes? plot/over/vs/over/color=black/thick/nolab xvert, yvert
yes? plot/over/vs/over/color=black/line/thick/nolab xvert, yvert
yes? shade/nolab/over/pal=gray if pt_in_poly(rose, xvert, yvert)
GE 0 then 1
On 5/19/2014 3:10 AM, 'jagadish
karmacharya' via _OAR PMEL Ferret Users wrote:
I have done that in defining reg1 and reg2;
For
example, reg1 corresponds to rectangular region bounded by
80-85 E and 22-25 N
you
can define such rectangular boxes for each of your
rectangula subregions.
However,
if your region has irregular shape (i.e. can't be divided
into rectangular boxes) then you need a shape file (or
coordinate of the boundary) from which you can creat a
NetCDF file and then use pt_in_poly function if ferret to
creat the mask
Jagadish
thanks for your quick reply but where
to specify my irregular shape lat lon notation
which i have to extract..
|