[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20030730: Plotting points in IDV



Hi Kevin-

Petty Kevin wrote:

 Sorry to bother you again, but can you describe the XML file
setup/configuration for the WebStart version. I am running IDV on a Linux
box
using WebStart. I want to make sure I put things in the right place.

Geez, I was hoping you were using the IA version. ;-( It's going to
be a bit more work for WebStart.

First, you'll need to create a JNLP file.  To do this, go to
http://www.unidata.ucar.edu/projects/metapps/webstart/IDV
and right click on the "Click here to Launch the IDV".  Use
your browser's option to save the file locally.

Create the files as outlined in my previous message (below).

Edit the downloaded JNLP file as follows:

1) Remove the href="IDV/idv.jnlp" from the jnlp tag:

change:
codebase = "http://www.unidata.ucar.edu/projects/metapps/webstart/"; href="IDV/idv.jnlp">

to:
         codebase = "http://www.unidata.ucar.edu/projects/metapps/webstart/";>

2) Next, add in the properties to the application startup:

Change:

       <application-desc main-class="ucar.unidata.idv.DefaultIdv"/>

to:

       <application-desc main-class="ucar.unidata.idv.DefaultIdv">
            <argument>-properties</argument>
            <argument>/home/petty/myidv.props</argument>

(change the file path to wherever you put it.

From a web browser, use the File menu command to open the
jnlp file.

If you want to make this generally accessible from any machine,
then you'll need to put the JNLP, locations and properties file
on a web server.  For the server to serve up the JNLP file, you'll
need to:

   Configure your Web server so that all files with the .jnlp file
   extension are set to the application/x-java-jnlp-file MIME type.
   Each Web server has a specific way in which to add MIME types. For
   example, for the Apache Web server you must add the following line
   to the .mime.types configuration file:

   application/x-java-jnlp-file JNLP

   Check the documentation for the specifics of your Web server.

Then, create a web page with a link to the JNLP file and users should
be able to launch the IDV using that link.  In the JNLP file,
you would put the URL of the properties file.  In the properites
file (myidv.props), you would need to put the web address of
the locations file instead of the aboslute path.

Let me know if any of this is not clear.



-----Original Message-----
From: Don Murray [mailto:address@hidden]
Sent: Thursday, July 31, 2003 2:32 PM
To: Unidata Support
Cc: address@hidden
Subject: Re: 20030730: Plotting points in IDV


Hi Kevin-



I'm interested in overlaying accident locations and/or aircraft tracks
(lat/lon points) onto data in IDV.


For station locations, you could create an XML file with the
geolocation information and name and description.  The format
would be (accident.locs):

<stationtable name="accident locations">
<station idn="" id="7XGWF" name="piper cub accident" lat="39:34:12" lon="-119:47:24" elev="0"/> <station idn="" id="8SCF" name="mooney accident" lat="38:34:12" lon="-120:47:24" elev="400"/>
</stationtable>

(units of altitude are meters, format for lat/lon can
be any valid McIDAS lat/lon format (theoretically at least ;-)).

Then, you would need to create an alternate properties file
that would point to this that would contain the line:

##The list of station table xml files
application.resource.locations = %IDVPATH%/nexradstns.xml;%IDVPATH%/profilerstns.xml;c:/accident.locs

(put it wherever you want).  The first two files listed are the
defaults, you can leave them off if you don't care about plotting
those locations.  You can add as many as you want, separated by
semicolons.  You could put them in your IDV home directory
<userhome>/.metapps/DefaultIdv and then use %USERPATH%
as the path to the file.

Then, if you are using the InstallAnywhere version of the IDV,
you would go to the directory where idv.jar is installed and
run:

jre/bin/java -Xmx512m -jar idv.jar -properties c:/myidv.props

(or whereever you put the file; reverse the slashes for
Unix systems).

If you are using the WebStart version, let me know and I
could figure that one out as well.

Once you have the IDV running, go to the Displays/Stations menu
and select the station table you want.  You can then control the
marker and the label you want for each location.

For an aircraft track, you could put that in a netCDF file and
read it in as a track file.  The CDL looks like:

ncdump p3_1.nc
netcdf p3_1 {
dimensions:
         time = UNLIMITED ; // (10 currently)
variables:
         double time(time) ;
                 time:units = "seconds since 1970-1-1 0:00:00 0:00" ;
                 time:long_name = "Time offset from base_time" ;
         float altitude(time) ;
                 altitude:units = "km" ;
                 altitude:long_name = "altitude MSL" ;
         float latitude(time) ;
                 latitude:units = "degrees_N" ;
                 latitude:long_name = "north latitude" ;
                 latitude:valid_range = -90.f, 90.f ;
         float longitude(time) ;
                 longitude:units = "degrees_E" ;
                 longitude:long_name = "east longitude" ;
                 longitude:valid_range = -180.f, 180.f ;

}

Load in the file as a track file and then plot the track of
altitude


Is there an easy way of doing this? I also have height (altitude) data for
aircraft track points. Is it possible to plot the
points in 3D along with meteorological data (e.g. gridded data)? I'm sure

it

is possible. What's the best way to go about doing this?


It's not pretty, but it should work. ;-)


Don
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
303 497 8643                                                  P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata WWW Service              http://my.unidata.ucar.edu/content/support
****************************************************************************