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
Re: connecting to a server to retrieve data (optimizing) [message #41944 is a reply to message #41806] Mon, 29 November 2004 04:45 Go to previous message
nunoragil is currently offline  nunoragil
Messages: 3
Registered: November 2004
Junior Member
andrew.cool@dsto.defence.gov.au (Andrew Cool) wrote in message news:<c6d70400.0411281810.7b804992@posting.google.com>...
> Craig Markwardt <craigmnet@REMOVEcow.physics.wisc.edu> wrote in message news:<on8y8mvzv1.fsf@cow.physics.wisc.edu>...
>> nunoragil@yahoo.com (Nuno Gil) writes:
>>
>>
>>> 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?
>>
>> Yes, read a byte array instead of a scalar byte. You choose the size
>> of the array you want to read, and if there is less data available,
>> then IDL will only read that much. The number of bytes read is
>> returned in the TRANSFER_COUNT keyword. You can then use that same
>> number to write the data to your file.
>>
>> Craig
>
>
> Nuno and Craig,
>
> I hope you guys have emailed RSI to add your support to the request
> for RSI to intrpduce an http/ftp client into IDL?
>
> See my recent post under "Support for getting HTTP/FTP clients into IDL"
>
> Cheers,
>
> Andrew
> DSTO, Adelaide, South Oz


Craig,
I'm having some problems writing the image.
If you try this link it will download a 16-bit signed Integer tiff
image with 2816 KB:
http://iceds.ge.ucl.ac.uk/cgi-bin/wcs?REQUEST=GetCoverage&am p;COVERAGE=srtm&SERVICE=WCS&map=wcs.map&BBOX=46, -25,47,-24&FORMAT=GEOTIFFINT16&CRS=EPSG:4326&RES X=0.00083333&RESY=0.00083333

However, if trying to get it via IDL with:
img=INTARR(1200,1200)
READU, in, img
WRITEU,out,img
I can only get a 2813 KB file and cannot open it properly.
1200x1200 are the number of pixels of the image.
By the way, if I declare the array bigger than this (lets say
2001x2001) the READU issues an "End of file encountered" error.

Thank you and regards,
Nuno
[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: Fri Oct 10 15:09:35 PDT 2025

Total time taken to generate the page: 0.96121 seconds