Import compressed (LZW) Geotiff - offline

1788
3
03-17-2016 07:02 AM
AlexGunko
New Contributor

Hi there,

I'm a developer in a web map project.

I'm working on an offline Import-geotiff task, everything works great besides compressed files..

I am using a library that parses the file but can handle only uncompressed files and with Packbits compression.

That's how I did it: The library provides me the image location and creates a canvas element with the image, then I create a graphic where the image should be and with a symbol of the image and it's size. The symbol is made using jsonUtils when the url is canvas.toDataURL() (In that way the canvas gives us a dataURL of a .png so the browser can handle this). The size of the symbol is changes as the user zoom in/out.

My questions are:

  1. Most of the tiff/tif images we work with are compressed with the LZW system, is there any way I can decompress the image before I start the process? Or any way I can parse the file?
  2. My solution with the symbol seems to be a little bit awkward, Is there any better way to do this?

If the above doesn't make sense - has anyone ever managed to import a tiff to a js client without using server side tools?

Thanks in advance, Ophir.

Tags (3)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Alex,

  I take it you have not seen the MapImageLayer class in the JS API.

MapImageLayer | API Reference | ArcGIS API for JavaScript

AlexGunko
New Contributor

The solution has to be offline and MapImage requires a href.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Alex,

   Hmm. Did not realize that was requirement. Ignore last then.

0 Kudos