NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Jon-This is probably a discussion better for idvdevelopers so as not to scare off the non-programmer IDV users ;-) , but....
The IDV uses the VisAD Data model not the netCDF CDM as the basis for the data it slices and dices. VisAD allows arbitrary samplings into a grid not limited to rows/columns like netCDF. However, there are IDV classes that take CDM GeoGrid objects and make the requisite VisAD Fields.
So, another lightweight approach might be to use the ucar.unidata.data.grid.GeoGridAdapter to create a VisAD FieldImpl from a GeoGrid and then use ucar.unidata.data.grid.GridUtil.sliceAlongLatLonLine() to get the slice as a FieldImpl. Basically, that will be a 2D array that you could then export to whatever graphics you want. It would require some understanding of the VisAD data model. It might also need some adjustments to the GeoGridAdapter methods to use outside the context of the IDV. But, as Jeff said, we'd trade that knowledge for help implementing ncWMS in RAMADDA. ;-)
Don On 1/18/11 6:38 PM, Jeff McWhirter wrote:
Hi Jon,I've seen that IDV can produce vertical section plots. I'm interested in re-using this capability in other software (ncWMS) if possible. I'd like to produce a plot as a standalone image (i.e. outside the context of Swing or any particular desktop), ideally as a BufferedImage. Could someone please point me to the relevant bit in the libraries please?You can use the IDV in server mode, creating an ISL file that generates a cross section display and capturing it as an image. You can see some example code in the ramadda svn tree: https://sourceforge.net/projects/ramadda/ under src/ucar/unidata/repository/idv/IdvOutputHandler This is basically a web based implementation of the IDV. Using the regular Cross Section display to do this would be inefficient because the display would also be adding itself into a 3D view. However, if you are interested I could work with you to make any necessary changes to the IDV base. Of course, you have to help me implement ncwms in RAMADDA (which I just started doing last weekend. go figure). -Jeff _______________________________________________ idvusers mailing list idvusers@xxxxxxxxxxxxxxxx For list information, to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
-- Don Murray NOAA/ESRL/PSD and CIRES 303-497-3596 http://www.esrl.noaa.gov/psd/people/don.murray/
idvusers
archives: