Unidata IDV Workshop for version 5.7 > Advanced Topics > Scripting with IDV
4.3.2 More on Generating Images
More examples on generating image and movie.
- First of all save this isl2.xidv file to your isl directory. This is a bundle with
two view panes. You can load this bundle into the IDV and see what this bundle doing. One pane displays the
temperature field and the other displays the geopotential height.
- Review this ISL file and find out the role of the viewindex:
<?xml version="1.0" encoding="ISO-8859-1"?>
<isl debug="true" offscreen="false" sleep="60.0minutes">
<bundle clear="true" file="${islpath}/isl2.xidv" wait="true"/>
<image file="${islpath}/image_${viewindex}.png" />
</isl>
image7.isl
- Now, change directory to the home directory (cd) and run:
runIDV /home/idv/isl/image7.isl
- What happened?
- Note, two images are created. If we want to generate a single image which combines these two images,
we'll use the combine property in the next ISL file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<isl debug="true" offscreen="false" sleep="60.0minutes">
<bundle clear="true" file="${islpath}/isl2.xidv" wait="true"/>
<image file="${islpath}/image_all.png" combine="true" />
</isl>
image8.isl
- The IDV gives you an easy way to generate a publication quality combined image.
- The next two ISL examples will provide some details of more advance isl scripts.
- How to define an ISL procedure to generate image.
<isl debug="true" offscreen="false">
<property name="dataTime" value="2001111217"/>
<bundle file="${islpath}/isl.xidv" clear="true" >
</bundle>
<procedure name="mkContourNColorfilledImage">
<display type="planviewcontourfilled" param="${ele_name}" >
<property name="id" value="display1" />
<property name="displayCategory" value="Basic"/>
<property name="contourInfo" value="interval=4;min=-40;max=140;base=-28;dashed=false;labels=false"/>
<property name="SmoothingType" value="SM5S"/>
</display>
<pause/>
<image file="${islpath}/${ele_name}${dataTime}.png"/>
</procedure>
<mkContourNColorfilledImage ele_name="T" />
</isl>
procedure.isl
- How to use the displayproperties tag to change two end points of a cross section
in the bundle RUC.xidv.
<isl debug="ture" offscreen="false">
<procedure name="mkContourCrossSection">
<bundle clear="true" file="${islpath}/RUC.xidv"/>
<pause/>
<displayproperties display="class:ucar.unidata.idv.control.ContourCrossSectionControl">
<property name="StartPoint" value="${startLocation}"/>
<property name="EndPoint" value="${endLocation}"/>
</displayproperties>
<pause/>
<image file="${islpath}/contourCS${idx}.png" display="class:ucar.unidata.idv.control.ContourCrossSectionControl"/>
</procedure>
<mkContourCrossSection idx="11" startLocation="34.0, -140.0" endLocation="40.0, -55.0"/>
</isl> contourCrossSection.isl
Unidata IDV Workshop for version 5.7 > Advanced Topics > Scripting with IDV