[Thread Prev][Thread Next][Index]

Re: [ferret_users] Scale Factor in Polymark



Hi Jennifer,
The polymark script defines the polygon shapes and then sets up some scaling so that the shapes are preserved on plots with various aspect ratios, and to give a nominal size. Then it calls the polygon command to draw the shapes. It's easy to make the symbols "bigger" or "smaller" but not that straightforward to make them a particular size.

Someone may write in and show how they've worked out a way to adjust the scale sent to the polymark script to get back a size in terms of the axis coordinates, but for drawing a few symbols, it might be just as easy to do this with the Ferret polygon command itself, using the 2D form of POLYGON:
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/POLYGON#_VPINDEXENTRY_1511

Here's a script that makes a circle 1 degree across on a map.  It depends on setting the axis ratio so the x-degrees per inch and y-degrees per inch are the same, so the circle will be round.

 ! define the circle shape in the same way that polymark.jnl does

yes? go polyshape circle
yes? list xpolyshape, ypolyshape

 ! The circle definition extends from -0.8 to 0.8. 
 ! Resize it to have a radius of 0.5 degrees.


yes? let xcircle = ysequence((0.5/0.8)*xpolyshape)
yes? let ycircle = ysequence((0.5/0.8)*ypolyshape)

 ! Draw an underlying map. Make the 10x10-degree map in a
 ! square plot box

yes? set win/asp=1:axis

yes? GO basemap x=230:240 Y=40:50 02

 ! Draw a red circle at a location. xloc and yloc could be lists
 ! of locations and the same commands would work:


yes? let xloc= 235
yes? let yloc = 46
yes? polygon/over/nolab/pal=red xcircle+xloc, ycircle+yloc, xloc

I think you'd just need to scale the circles using 0.025/0.8 to get a 0.05-degree circle.

Ansley


On 11/5/2014 2:22 PM, Jennifer Keene wrote:
I am trying to draw mooring avoidance circles over bathymetry data, and am currently using this command:
! Plot avoidance area for most recent mooring location
GO POLYMARK POLY/OVER/PALETTE=grey_light/NOLABELS Lon[i=1] Lat[i=1] , , circle 9

Is there a way to use actual geographic distances to define the radius of the circle?  For example, I want this circle to have a radius of 3NM.

I adjusted my plot Lat/Lon ranges so that the ratio of degrees per inch on each axis was the same (0.075°/inch).  Then I translated my desired circle radius to inches (3NM = 0.05° = 0.67” on my axis scale).  Now I can’t quite figure out how to translate that to the scale parameter.  Can anyone help me figure out how to do this last step?  Or should I be doing something different?

Thank you,

Jennifer Keene
Research Scientist/Engineer
NOAA Pacific Marine Environmental Lab
7600 Sand Point Way, Bldg. 3
Seattle, WA 98115
(206)526-4805



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

Privacy Policy | Disclaimer | Accessibility Statement