Re: [OpenMap Users] Extending to read from DODS / NetCDF

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 24 Aug 2004 13:46:18 -0400

Hi Tennessee,

If you are using 4.6, you'll want to extend the OMGraphicHandlerLayer
and override the prepare() method. That method gets called when the
projection changes or when the layer is added to the MapBean, and it
gets called in the layer's own thread. That's where you want to do the
work getting your data from your source, creating the OMGraphics (as
Keith alluded to earlier), and returning an OMGraphicList. Wether you
create a new OMGraphicList for every projection change (and therefore,
that call to prepare()), is up to you - you can also create your list
just the first time prepare() is called, or reproject the list you
have.

You call getList() inside the prepare() method to get the current
OMGraphicList for the layer, and if it's null you know it's the first
time prepare() is called, and that's a good flag to use for
initialization or one-time data preparation. If it's not null and
contains the OMGraphics you want, or after you've created your new
OMGraphicList, call GraphicList.generate(getProjection());

Hope this helps,

Don

On Aug 23, 2004, at 8:30 PM, Tennessee James Leeuwenburg wrote:

> Hi all,
>
> I am currently using VisAD to render my data, but want to take OpenMap
> for a spin also. This means extending Layer and writing DODSLayer or
> NetCDFLayer. But I don't really understand how extending layer
> actually does the trick, which also results in my not really
> understand how to go about extending layer.
>
> What I know how to do is to get the array of floats that represents my
> data samples, and munge them into whatever form necessary - be that a
> 3d array, or objects, whatever, I can slice and dice to the
> appropriate data representation. What I don't understand how to do is
> to create the requisite objects inside OpenMap. The FAQ says, "Once
> you have that, you can create a list of OMGraphics that OpenMap will
> place on the map". Is there an easy way to go from my data arrays to
> the OMGraphics list? I have gridded data which I would like to
> represent as either contour lines or color-shading, and point data
> which I would like to represent as point measurements.
>
> Anyway, I know I don't have the most perfect grasp of the openmap
> system, but I'm hoping the user community won't mind some newbie
> questions!
>
> Cheers,
> -T
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Aug 24 2004 - 13:46:41 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:05 EDT