Question

Remove black border on rasters in windows explorer


Badge +3

Hi

I have a workbench (), where I am reprojecting to WGS84, adding grids and text and clipping to a grid index. After the clip I was getting black borders, but I set this data to nodata and this fixed the problem when looking at the rasters in GIS software. However, in windows explorer the black borders can still be seen. I understand this doesn't effect the data, but it doesn't look good when sending the data to others. Is there any way I can remove these black borders in windows explorer.

Thanks

B


9 replies

Userlevel 2
Badge +17

Unfortunately it seems to be unavoidable as long as you generate a palette for the raster. If you don't generate a palette, you can force to display the black (0,0,0) cells transparent in Windows Explorer by setting 0 to the alpha band of them.

Badge +3

Unfortunately it seems to be unavoidable as long as you generate a palette for the raster. If you don't generate a palette, you can force to display the black (0,0,0) cells transparent in Windows Explorer by setting 0 to the alpha band of them.

Thanks Takashi,

I am generating a palette to keep the size down. When I don't generate a palette the raster file balloons to 4 times the size. Are there any other ways to keep the size down? Thanks very much for your help.

B

Userlevel 2
Badge +17

Unfortunately it seems to be unavoidable as long as you generate a palette for the raster. If you don't generate a palette, you can force to display the black (0,0,0) cells transparent in Windows Explorer by setting 0 to the alpha band of them.

I think generating a palette is the best way to size down. The black border showing by Windows Explorer won't cause any problem in use of the data. I don't mind that.

Badge +3

I think generating a palette is the best way to size down. The black border showing by Windows Explorer won't cause any problem in use of the data. I don't mind that.

Thanks Takashi, just out of interest, my original raster is 1 band palette. Throughout the translation why is the raster going to 4 band?

Thanks

B

Userlevel 2
Badge +17

I think generating a palette is the best way to size down. The black border showing by Windows Explorer won't cause any problem in use of the data. I don't mind that.

Because your workspace has a RasterBandAdder to add the fourth band (Alpha8).

Badge +3

Because your workspace has a RasterBandAdder to add the fourth band (Alpha8).

Haha, yes. I'm sorry I made this workspace a few months ago. :) Thank you!!

Badge +3

Unfortunately it seems to be unavoidable as long as you generate a palette for the raster. If you don't generate a palette, you can force to display the black (0,0,0) cells transparent in Windows Explorer by setting 0 to the alpha band of them.

Hi @takashi,

One more question, I have created a variation of this workbench 3 times. The one here is to create a WGS84 product, I have another to create Irish Grid and a last one for Irish Transverse Mercator. The output on the WGS94 workbench is the only one that has the black borders, can you think of any reason this may be the case? Thanks very much for all your help so far.

Regards

B

Userlevel 2
Badge +17
Hi @takashi,

One more question, I have created a variation of this workbench 3 times. The one here is to create a WGS84 product, I have another to create Irish Grid and a last one for Irish Transverse Mercator. The output on the WGS94 workbench is the only one that has the black borders, can you think of any reason this may be the case? Thanks very much for all your help so far.

Regards

B

That depends on the relationship between the destination coordinate system and the source coordinate system, I think. That is, the gaps (black border) could appear if the destination CS axes tilt against the source CS axes, could not otherwise.

I assuming that the Clipper feature read from a Shapefile dataset is a rectangle polygon originally. In that case, if you don't like the black border, try inserting a BoundingBoxReplacer between the Reprojector_2 and the Clipper (Clipper port).

Badge +3

That depends on the relationship between the destination coordinate system and the source coordinate system, I think. That is, the gaps (black border) could appear if the destination CS axes tilt against the source CS axes, could not otherwise.

I assuming that the Clipper feature read from a Shapefile dataset is a rectangle polygon originally. In that case, if you don't like the black border, try inserting a BoundingBoxReplacer between the Reprojector_2 and the Clipper (Clipper port).

Thanks @takashi, you have been incredibly helpful and patient. I really appreciate it. I will try this. B

Reply