Solved

Thrim white borders of a tiff

  • 28 April 2016
  • 2 replies
  • 5 views

Badge

Hi, I have some large 1 bit single band tiffs and I want trim the empty white space from each edge of the image.

Maybe 25 pixels from the 1st black pixel found on each border if possible.

I think I need to determine the 1st black pixel from the border on each side then use this info to create a polygon to clip the image.

I just have no idea how to work out the area I want to clip within the workbench, not much of a raster expert.

icon

Best answer by jdh 28 April 2016, 18:13

View original

2 replies

Badge +22

Assuming your borders are not regular:

 

Set the white pixel to NoData

 

Use the RasterExtentsCoercer in DataExtents mode

 

HullAccumlator to get a single output polygon with no holes

Buffererer (-1*#pixels*pixel_size)

Badge

Assuming your borders are not regular:

 

Set the white pixel to NoData

 

Use the RasterExtentsCoercer in DataExtents mode

 

HullAccumlator to get a single output polygon with no holes

Buffererer (-1*#pixels*pixel_size)

geat thanks, I do want regular borders so have adjusted the RaterExtentsCoercer to use DataMBRExtents.

Some twueking to do but looks like I can achieve what I want with these transformers, thanks for the help.

Reply