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.
Kjell- Don Murray wrote:
You could still use GeoTools on the VisAD adapter by creating a GeoToolsCoordinateSystem that would take a GeoTools object and use that to do the conversion. I'll look at GeoTools when I get a chance (maybe next week). MapProjectionDisplay is in the examples directory. The examples do not have packages, so you would have to cd to the examples directory and run java MapProjectionDisplay.
I just took a quick look at the GeoTools source and it looks like you could create a GeoToolsProjectionCoordinateSystem that would extend visad.georef.MapProjection and take a uk.ac.leeds.ccg.geotools.projections.Projection as a constructor. The toRef method (ref being lon, lat) would call Projection.unproject() for each x,y and the CS.fromRef() would call Projection.project(). You'd have to get the indices of lat/lon set right, but MapProjection has hooks for this. The defaultMapArea could be defined from Projection.projectedExtent. Again, I'd reiterate Tom's suggestion that you let VisAD do as much of the hard work automagically instead of having to manually do the transforms. Don ************************************************************* Don Murray UCAR Unidata Program dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000 (303) 497-8628 Boulder, CO 80307 http://www.unidata.ucar.edu/staff/donm *************************************************************
visad
archives: