Skip to main content
Solved

Convert Packbits geotiff to lzw

  • March 17, 2017
  • 4 replies
  • 69 views

I'm new to FME, and I need to transform a Packbit compressed geotiff file to a LZW compressed geotiff file. I'm using a geotiff reader and a geotiff writer, the later configured to use LZW compression. The output file is still in packbits

Best answer by takashi

Hi @juanpablomenich, I was able to reproduce the same situation: Read a raster feature from a geotiff file compressed by pack-bits method with GEOTIFF reader, write the raster with GEOTIFF writer having "lzw" set as the Compression Method parameter, but the resulting geotiff file is still compressed by pack-bits method.

I guess that a format attribute called "geotiff_compression_method" defined by the reader conflicts with the Compression Method parameter setting for the writer Try once exposing the "geotiff_compression_method" attribute and removing it before writing.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

takashi
Celebrity
  • Best Answer
  • March 18, 2017

Hi @juanpablomenich, I was able to reproduce the same situation: Read a raster feature from a geotiff file compressed by pack-bits method with GEOTIFF reader, write the raster with GEOTIFF writer having "lzw" set as the Compression Method parameter, but the resulting geotiff file is still compressed by pack-bits method.

I guess that a format attribute called "geotiff_compression_method" defined by the reader conflicts with the Compression Method parameter setting for the writer Try once exposing the "geotiff_compression_method" attribute and removing it before writing.


Hi @juanpablomenich, I was able to reproduce the same situation: Read a raster feature from a geotiff file compressed by pack-bits method with GEOTIFF reader, write the raster with GEOTIFF writer having "lzw" set as the Compression Method parameter, but the resulting geotiff file is still compressed by pack-bits method.

I guess that a format attribute called "geotiff_compression_method" defined by the reader conflicts with the Compression Method parameter setting for the writer Try once exposing the "geotiff_compression_method" attribute and removing it before writing.

Thanks! worked like a charm

 

 


Forum|alt.badge.img
  • March 20, 2017

Hi @juanpablomenich, I was able to reproduce the same situation: Read a raster feature from a geotiff file compressed by pack-bits method with GEOTIFF reader, write the raster with GEOTIFF writer having "lzw" set as the Compression Method parameter, but the resulting geotiff file is still compressed by pack-bits method.

I guess that a format attribute called "geotiff_compression_method" defined by the reader conflicts with the Compression Method parameter setting for the writer Try once exposing the "geotiff_compression_method" attribute and removing it before writing.

Thanks for this Takashi. I just ran into the same problem and this solved it. I would definitely call this a bug.

 

 


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • March 21, 2017

Hi @juanpablomenich, I was able to reproduce the same situation: Read a raster feature from a geotiff file compressed by pack-bits method with GEOTIFF reader, write the raster with GEOTIFF writer having "lzw" set as the Compression Method parameter, but the resulting geotiff file is still compressed by pack-bits method.

I guess that a format attribute called "geotiff_compression_method" defined by the reader conflicts with the Compression Method parameter setting for the writer Try once exposing the "geotiff_compression_method" attribute and removing it before writing.

Hi @juanpablomenich, @takashi and @mbu. Development is aware of this issue and has made some plans for improvement. Improvements are planned for raster and point cloud formats, as well as GEOTIFF specifically. We will update this question when Development has implemented these improvements.