Skip to main content
Question

Remove black border on rasters in windows explorer

  • July 12, 2019
  • 9 replies
  • 21 views

bjudes
Enthusiast
Forum|alt.badge.img+10

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

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.

9 replies

takashi
Celebrity
  • 7843 replies
  • July 12, 2019

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.


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • 117 replies
  • July 12, 2019

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


takashi
Celebrity
  • 7843 replies
  • July 12, 2019

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.


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • 117 replies
  • July 12, 2019

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


takashi
Celebrity
  • 7843 replies
  • July 12, 2019

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).


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • 117 replies
  • July 12, 2019

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!!


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • 117 replies
  • July 15, 2019

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


takashi
Celebrity
  • 7843 replies
  • July 15, 2019
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).


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • 117 replies
  • July 15, 2019

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