comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » connecting to a server to retrieve data (optimizing)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
connecting to a server to retrieve data (optimizing) [message #41806] Sat, 27 November 2004 20:57 Go to previous message
nunoragil is currently offline  nunoragil
Messages: 3
Registered: November 2004
Junior Member
Hi listers,

I'm fetching some data from the web with the following routine. This
does the trick but it gets very slow, for it reads the data on the
server and writes it localy bit by bit in a loop.
Does anyone knows if it is possible to send the request and simply get
the entire data in one turn?
If not, can I read the data bit by bit and append it inside a variable
instead of first writing it all to the disk in a file and then reading
that same file afterwards?

Regards
Nuno


FUNCTION getCoverage, coverage, xMin, xMax, yMin, yMax, format

getRequest='GET /cgi-bin/wcs?REQUEST=GetCoverage&COVERAGE='+coverage+'&a mp;SERVICE=WCS&'+
$
'map=wcs.map&BBOX='+xMin+','+yMin+','+xMax+','+yMax+'&am p;FORMAT='+format+
$
'&CRS=EPSG:4326&RESX=0.00083333&RESY=0.00083333'

host = 'iceds.ge.ucl.ac.uk'
port = 80
SOCKET, unit, host, port, /GET_LUN

PRINTF, unit, getRequest
WIDGET_CONTROL, /HOURGLASS

OPENW,img, 'c:\temp.tif', /GET_LUN
byte_in = 0B

WHILE EOF(unit) EQ 0 DO BEGIN
READU, unit, byte_in
WRITEU,img,byte_in
ENDWHILE

FREE_LUN, unit, img
CLOSE, /ALL
RETURN, READ_TIFF ('c:\temp.tif', GEOTIFF = imgGeoTags)
END
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Online Marketing
Next Topic: Compilation error with code from ENVI Help

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:57:50 PDT 2025

Total time taken to generate the page: 0.00462 seconds