[Thread Prev][Thread Next][Index]

[ferret_users] PT_IN_POLY



Dear Ferret developers,
I just noticed a problem when I used the function PT_IN_POLY and the choice of the region. First I used the example from the ferret site. It worked and I wanted to run my own example in the Benguela upwelling area off Namibia at approx. 10°E-14°E.


This is my example that does not work:

use etopo60
let xp = {10.1,10.4,10.3,11.6,14,11.5,10.1}
let yp = {-17,-19,-20,-23,-23,-17,-17}
go basemap x=-20:50 y=10:-40 20
plot/vs/thick/line/color=blue/over/nolab xp,yp
let mask = if pt_in_poly(rose,xp, yp) gt 0 then 1
shade /over mask


This is my example that does work:

use etopo60
let xp = {370.1,370.4,370.3,371.6,374,371.5,370.1}
let yp = {-17,-19,-20,-23,-23,-17,-17}
go basemap x=340:410 y=10:-40 20
plot/vs/thick/line/color=blue/over/nolab xp,yp
let mask = if pt_in_poly(rose,xp, yp) gt 0 then 1
shade /over mask

Okay, I know now what I need to do. But it was very confusing for several hours.... So maybe this problem is worth to get your attention?

Cheers,
Anja

--
Dr. Anja Eggert

Leibniz Institute for Baltic Sea Research Warnemünde
Physical Oceanography and Instrumentation
	
Seestraße 15
D-18119 Rostock

email:          anja.eggert@xxxxxxxxxxxxxxxxx
Telephone: 	+49 (381) 5197-148
Fax: 	        +49 (381) 5197-440
Room: 	        210/V



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement