Return to LAS FAQ


Direct links to products


Question:



How can I get a URL directly to an LAS product, bypassing the LAS user interface?

Example:

Here is a request for SMMR snow depth over North America from our NOPP server.

And another for a Hofmoeller plot along the equator showing the 1983 El Niño.

Explanation:

You could always grab an image URL from the page source for the output window. However, this image is not guaranteed to exist for any particular length of time. If you are using any cache management, this image will be removed if it hasn't been requested for a while. The URLs used above are actual product requests to the data server. If the image has been previously generated then it will be immediately returned from the cache. If it no longer exists, a new product will be created and returned.

Solution:

Up through LAS v6.1, there is no way to request a product-request-URL from LAS. However, if you are an LAS site maintainer you can grab URLs from las/server/log/access file. The 'RQST:' lines in this file are the GET encoded versions of the actual XML requests. You'll need to prepend the host address to get the full URL.

Note: In LAS v6.2 (due out in Fall 2003) a direct product-request-URL will be available on the output page.

Just make a request of your server and then look at the last nine lines of the log/access file. You should see something like this (if you ignore the line breaks I've inserted):

> tail -9 ../log/access | grep RQST
RQST: GET /nvods-bin/LASserver.pl?xml=%3C%3Fxml+version%3D%221.0%22%3F%3E%3ClasRe
quest+href%3D%22file%3Alas.xml%22+package%3D%22%22%3E%3Clink+match%3D%22%2Flasda
ta%2Foperations%2Fshade%22+%2F%3E%3Cproperties%3E%3Cferret%3E%3Cformat%3Eshade%3
C%2Fformat%3E%3Csize%3E.5%3C%2Fsize%3E%3C%2Fferret%3E%3Cui%3E%3Cvarname%3ESnow+D
epth%3C%2Fvarname%3E%3Cdsetname%3ESnow+Depth+from+SMMR%3C%2Fdsetname%3E%3Cview%3
Exy%3C%2Fview%3E%3Cconfigid%3E0%3C%2Fconfigid%3E%3Cdocroot%3Ehttp%3A%2F%2Fferret
.wrc.noaa.gov%2Fnopp%2Fmain.pl%3C%2Fdocroot%3E%3C%2Fui%3E%3C%2Fproperties%3E%3Ca
rgs%3E%3Clink+match%3D%22%2Flasdata%2Fdatasets%2Fsmmr_snw_depth%2Fvariables%2Fsn
ow_depth%22%3E%3C%2Flink%3E%3Cregion%3E%3Crange+type%3D%22x%22+low%3D%22-172.0%2
2+high%3D%22-48.0%22%2F%3E%3Crange+type%3D%22y%22+low%3D%2218.0%22+high%3D%2289.
5%22%2F%3E%3Cpoint+type%3D%22t%22+v%3D%2215-Feb-1983%22%2F%3E%3C%2Fregion%3E%3C%
2Fargs%3E%3C%2FlasRequest%3E&op=++&custom1=++&custom2=++&targetURL=++&state=++

You can test your URL by prepending the host address and pasting everything from '/nvods-bin/' to the end into your browser.

Note: Using Macromedia Dreamweaver 4 I had some difficulties with Dreamweaver overzealously encoding '+' as '%2B' while inappropriately decoding '%3C', '%3D', '%3E' and '%3F' as '<', '=', '>' and '?' inside the URL. I had to use find/replace in the source code to fix this.


Jonathan Callahan: Jonathan.S.Callahan@noaa.gov
Last modified: June 11, 2003