This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: "Paul Gifford" <address@hidden> >Organization: independent >Keywords: 200312300421.hBU4LFp2008981 Hi Paul- re: affiliation > Not that it matters, but I'm not with SAIC. I'm an independent contractor >(at least with the work I'm doing with the IDV) Ooops, sorry about that. I've changed it in the archives. > Maybe I'm a little dense here, but I'm not seeing it. I'm working in the >getDataInner method of my data source. I'm not sure how I can get a handle >on either the TimeSeriesControl or the PointProbe from there. Okay, I thought you were looking on the control side. Here's another possible way to do this. Each DataChoice has a Hashtable of properties (sneaky way of passing things around). You could create a Hashtable with some key and the value would be the starting position (let's say an EarthLocation). On the control side, you'd need to make a modification to the setData method of TimeSeriesControl to pick up the location from the Hashtable and set the initial position. The problem with this is that the probes are in XY space, not Lat/Lon space. So, you'd have to convert your lat/lon point to an XY point. You could do this by: if (dataChoice.getProperties() != null) { Hashtable props = dataChoice.getProperties(); EarthLocation elt = (EarthLocation)props.get(INITIAL_PROBE_EARTHLOCATION); if (elt != null) { // get XYZ position of the earth location RealTuple rt = getMapDisplay ().getSpatialCoordinates(elt); Real[] reals = rt.getRealComponents(); setProbePosition(new RealTuple(new Real[] {reals[0], reals[1]})) ; } } You'd have to modify LineProbeControl to implement the setProbePosition method: public void setProbePosition (RealTuple xy) throws VisADException, RemoteException { probe.setPosition(xy); } For INITIAL_PROBE_EARTHLOCATION, I implemented the following in GridDisplayControl: /** Key for setting intial probe position */ public static final String INITIAL_PROBE_EARTHLOCATION = "INITIAL_PROBE_EARTHLOCATION"; and then put in IdvConstants: public static final String INITIAL_PROBE_EARTHLOCATION = GridDisplayControl.INITIAL_PROBE_EARTHLOCATION; and used this over in the DataSource for the Hashtable key. This would all break the bundling facility since if you moved the probe and it's position was stored in the bundle, then you would effectively override this in the setting of the probe position. A way around this would be to implement a getInitialPosition() method in LineProbeControl which would return the private initPosition: public RealTuple getInitialPosition() { return initPosition; } and change the logic above to be: if (elt != null && getInitialPosition() == null) { ..... This is probably more than you wanted to do, but I will look at making this a global solution for the next release. re: AMS >Unfortunately I won't be there. During the past year the company I was >working for cut off the money for our weather projects and moved me onto >something else far less interesting. This fall I was hired on at Lockheed >Martin where I'll be working on intelligence systems (once I get my security >clearance). It's not weather but it's interesting, plus I have my >contracting work to keep my hand in the visualization pot :) Sorry we won't see you. Don