The reason I want to do the transformations (projections) ourself, is to be
able to support more output projections (to the user). We will probably use
the projection package in geotools. The interpolation we gladly let VisAd
The JGrib package now handles Lambert and Stereographics grids and convert
it to lat/long. Probably we will be able to support more coordinate systems
in the future. (JGrib is an open source project at
Another question related to interpolation: If one wants to interpolate to a
pixel sized grid, is it more efficient to first interpolate to a "coarse"
rectangular grid (both geometry and topology) and from there interpolate to
the pixel sized grid?
> -----Original Message-----
> From: Tom Whittaker [mailto:tomw@xxxxxxxxxxxxx]
> Sent: 20. mars 2003 13:24
> To: Kjell Røang
> Cc: visad-list@xxxxxxxxxxxxx
> Subject: Re: Resampling from lat/lon to projection
> Hello Kjell...
> VisAD already has methods to very efficiently resample data from one
> CoordinateSystem to another. Otherwise, the most efficient way is to
> step through your 'destination' grid, compute the lat/lon for each
> point, and then look up the point (just an indexing for a regular
> lat/lon grid) and do your interpolation.
> As I said, VisAD can also do this, and provides several built-in
> projections (for example, see GRIBCoordinateSystem where I've
> pre-defined several GRIB grids), including generalized conformal. The
> main reason to use the CoordinateSystems is that it allows you to more
> easily combine data and displays in different projections.
> Regarding writing a file adapter, the job is to turn the external format
> (GRIB file) into a VisAD Data object. Most file adapters turn the
> entire file into one Data object. In the case of grid files, the "top
> level" is often a Tuple. An excellent example of this is provided by
> the NetCDF adapter ("Plain"). To most easily see the structure, do this
> (in Python):
> I hope you are successful in creating the adapter for GRIB files - it
> would make an excellent addition to the VisAD library.
> Kjell Røang wrote:
> > Hi
> > I want to resample a grid in lat/lon to a grid in a projection
> and do the
> > transformations myself. Both grids has a rectangular topology and the
> > projection grid has also has a rectangular geometry. Then, what
> will be most
> > efficient:
> > 1
> > Transform all lat/long coordinates to the projection (forward
> transform) and
> > resample the data to the projection grid (in "projection space")
> > 2
> > Transform the projection grid to lat/lon (inverse transform)
> and resample
> > the data to this transformed projection grid (in "lat/lon space")
> > If someone has some input to this and/or to how to resample
> most effective I
> > will be happy.
> > As I am using GRIB data and have a Java GRIB reader (JGrib of
> course, look
> > at sourceforge), I would like to know how to make a "GRIB adapter". Does
> > anyone have input to this?
> > Kjell R