astromatic / Leaflet.TileLayer.IIP

Add IIP layering support to the Leaflet library
Other
14 stars 7 forks source link

How can I get image.ptif file? #5

Open jeffstud opened 8 years ago

jeffstud commented 8 years ago

HI, I have made the iipimage server work. When I try to use leaflet plugin for iipimage server, it doesn't work. I think the problem may be here: layer = L.tileLayer.iip('/fcgi-bin/iipsrv.fcgi?FIF=/path/to/image.ptif').addTo(map); two questions: 1.Does FIF=/images/image.ptif equal to C:\images\image.ptif? 2.I have only tiled tif file, have not ptif file? How can I get it? Thank you very much.

jeffstud commented 8 years ago

Can I rename image.tif to image.ptif?

ebertin commented 8 years ago

Does FIF=/images/image.ptif equal to C:\images\image.ptif?

Unfortunately I am not familiar with Windows web servers. Is you web server running on Windows?

I have only tiled tif file, have not ptif file? How can I get it?

IIPImage operates on tiled TIFF multiresolution "pyramids" which I chose to suffix with the ".ptif" extension. A simple TIFF file won't do it. You can create TIFF multiresolution pyramids in a number of ways (check out this page. I can only advise you when it comes to creating TIFF multiresolutions pyramids from FITS, using the STIFF package: please check out the STIFF documentation or this page.

jeffstud commented 8 years ago

Yes. My web server runs on windows. Could you send me a ptif link, I download it and test? Thank you very much.

ageblade commented 8 years ago

Does FIF=/images/image.ptif equal to C:\images\image.ptif?

It depends on how you configure it on your IIS. check this and this with focus on FILESYSTEM_PREFIX variable

Also you need to host the IIP server on the same domain if you are using '/fcgi-bin/.' without the full domain URL

ruven commented 8 years ago

1.Does FIF=/images/image.ptif equal to C:\images\image.ptif?

Yes. You should use forward slashes / for your FIF paths, however.

Could you send me a ptif link, I download it and test? Thank you very much.

You can find an example tiled multi-resolution tiff here: http://iipimage.sourceforge.net/documentation/images/

jeffstud commented 8 years ago

Yes. I have download the sample image from the site. However, the suffix of it is tif, not ptif. It doesn't work. If I use iipmooviewer, the .tif file can be displayed. What's the reason? : (

jeffstud commented 8 years ago

the codes of viewer is as following:

link rel="stylesheet" href="leaflet.css" / script src="leaflet-src.js"/script script src="TileLayer.IIP.js"></script

var map = L.map('map', {center: [0.0,0.0], zoom: 3}), layer = L.tileLayer.iip('/fcgi-bin/iipsrv.fcgi?FIF=/images/output.ptif').addTo(map);

jeffstud commented 8 years ago

I create output.ptif using ImageMagick I put the output.tif in the C:\images\ But I still get the information "unexpected response from iip server /fcgi-bin/iipsrv.fcgi" Could you give me some advice? Thank you.

jeffstud commented 8 years ago

my server is apache.

ruven commented 8 years ago

See what it says in the iipsrv log file.

jeffstud commented 8 years ago

I cannot find the iipsrv log file.

jeffstud commented 8 years ago

I think there are two possibilities. first, the wrong path. second, the wrong file. Could you offer me a right ptif image like the one in demo? http://image.iap.fr/iip/ I want to use the same code and the same image to test to find the answer.