Re: associating a projective coordinate system with a data source?

Hi Eric-

Eric Davies wrote:

I've written some code that translates from coordinate systems expressed in OGIS WKT to ProjectionImpl objects, but I'm having difficulty spotting how I tell IDV that my custom IDV data source is expressed in that Projection. My custom data source represents a grid.

When you create the VisAD data object that represents your grid, you'll
need to add in a CoordinateSystem  for the domain set that will take the
x,y positions to lat/lon. If it's a 3D grid, you'll also need to account
for the vertical dimension (translating to altitude).

You could look at the GeoGridDatasource and GeoGridAdapter classes
in ucar.unidata.data.grid to see how we do this for geogrids.  In fact,
you might want to consider using the GeoGrid framework and the
new netCDF-Java 2.2 IOServiceProvider (iosp) framework as a way for
creating a GeoGrid from your data and then you can just create
a GeoGridDataSource and let the existing code do the hard work for
you.

I know some work is underway to support the OGIS WKT specs in nj22
anyway, so if you want to work together on this and share code,
let us know.

I'm also having difficulty getting my grid to be be displayed in the main window, as opposed to a new Display window.

When you say new Display window, does this mean you are creating
it as an Omni Control?  If so, then the problem is that you'll need
to set the categories on the DataChoice.  See below.

I'd like to build an
isosurface from it and overlay that on top of a system map.
Prehaps the issue is the lack of a coordinate system attached to the data?

If you have a DataSource that provides a DataChoice as a grid, the
framework should support the display in the main window.  You'll
need to set the DataCategories on the DataChoice to identify it
as a grid.  If your datasource extends GridDatasource, you'll
have access to the predefined categories for grids.

any pointers/explanations appreciated.

Don Murray
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
        "Time makes everyone interesting, even YOU!"
*************************************************************



  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvusers archives: