[Thread Prev][Thread Next][Index]

Re: custom.pl




Joe Sirott wrote:

> Hi John,
>
> The size is sent as a Ferret property; you can get to it in the init
> method, for instance, as follows:
>
>          my $size = $req->getProperties('ferret')->{size};
>
> This API is not documented in the version of LAS you are using; it will be
> in the next release (coming soon!). If you want an idea of how to use the
> API, check out the init method in Ferret.pl.
>
> That's the good news. The bad news is that the 2d window size is reduced to
> a 1D parameter by the user interface (for some reason, Ferret uses a 1D
> number that is proportional to the *area* of the window to specify window
> size), so some information is lost. The formula used is:
>
> size = xwidth*ywidth/960000
>
> so, for instance, a 800X600 window gives you a size of 0.5

aside remark:

If is better to communicate window size to Ferret with two arguments -- height
and width -- that is easily supported.

The window size in Ferret is controlled by "size" and "aspect" (ratio).  The
1-to-1 translation from height/width to size/aspect is encapsulated in the
Ferret script

    yes? GO set_pixel_size xsize ysize   ! set window size in pixels

    - steve

======================================

>
> At 02:29 PM 1/24/2002 -0700, John C Cartwright wrote:
> >Hello All,
> >
> >I'm trying to add a new visualization program to LAS and looking at the
> >example in the manual.  Specifically, I'm looking at the code for
> >custom.pl.  I see how I can grab the geographic range from the request,
> >but am wondering how to get the user-specified window size.
> >
> >I am also confused here because, I understood that a LAS::Request object
> >is being passed into the init() method and I see a getChildren() method
> >being used but cannot locate it the documention for this type of object.
> >
> >Thanks for any help!
> >
> >
> >-- john
> >
> >=====================================================
> >John Cartwright
> >Professional Research Assistant / Associate Scientist
> >CIRES, SEG/NGDC/NOAA
> >(303) 497-6284
> >jcartwright@ngdc.noaa.gov
> >=====================================================
> >
> >

--
Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement