[GPlates-discuss] Need to omit white space in rasters

John Cannon john.cannon at sydney.edu.au
Sun Apr 8 20:47:03 AEST 2018


Hi Bruce,

I don't have much experience with this, but maybe you can set the NoData value to the colour you want to be transparent (eg, white), and then export as a numerical raster type (such as GeoTIFF). Although you might need to turn compression off to avoid changing the pixel values during export (such that they no longer equal the NoData value) if the compression is lossy.

This link talks a bit about NoData (in Arcmap raster datasets)...

https://protect-au.mimecast.com/s/XMpsCE8kz9tOo8pZCNAwpd?domain=desktop.arcgis.com

...maybe you could try setting the NoData value in the raster properties dialog (see bottom of that page). Note that Red/Green/Blue data is usually represented as three bands in a numerical (data) raster so you might have to set a NoData value for each band.

Regards,
John

From: GPlates-discuss [mailto:gplates-discuss-bounces at mailman.sydney.edu.au] On Behalf Of Eglington, Bruce
Sent: Sunday, 8 April 2018 4:13 PM
To: GPlates general discussion mailing list
Subject: Re: [GPlates-discuss] Need to omit white space in rasters

Hi John
  Any suggestion for how I might set alpha values for specific pixels in a colour raster? In Arcmap I can specify that some pixel value, normally a background value of 255 or 65535, should be shown as transparent but I don't know of a way to save this as an alpha value

Bruce
________________________________
From: GPlates-discuss <gplates-discuss-bounces at mailman.sydney.edu.au<mailto:gplates-discuss-bounces at mailman.sydney.edu.au>> on behalf of John Cannon <john.cannon at sydney.edu.au<mailto:john.cannon at sydney.edu.au>>
Sent: Saturday, April 7, 2018 9:46:08 PM
To: GPlates general discussion mailing list
Subject: Re: [GPlates-discuss] Need to omit white space in rasters

Hi Bruce,

Yes that should be possible in the following situations...

Numerical rasters (eg, NetCDF, GeoTIFF) contain a single data value per pixel, and so any pixels equal to the no-data value specified for the raster (eg, NaN) should get rendered as transparent (ie, not drawn). An example is the age grid in the sample data (which uses no-data=NaN).

Colour rasters that support transparency (eg, PNG, BMP, TIFF) contain Red/Green/Blue/Alpha channels per pixel, and so any pixels with alpha equal to zero should get rendered as transparent (ie, not drawn). Also note that alpha values between 0 and 1.0 (where 1.0 is equivalent to 255 for 8-bit colour channels) get rendered as translucent (ie, underneath is partially visible).

Regards,
John


From: GPlates-discuss [mailto:gplates-discuss-bounces at mailman.sydney.edu.au] On Behalf Of Eglington, Bruce
Sent: Sunday, 8 April 2018 2:45 AM
To: GPlates general discussion mailing list (gplates-discuss at mail.usyd.edu.au<mailto:gplates-discuss at mail.usyd.edu.au>)
Subject: [GPlates-discuss] Need to omit white space in rasters

Hi
  Is there a way to turn off or omit parts of raster images which either have no data or a background colour? In general, these appear bright white in GPlates.

Bruce




Bruce Eglington (Ph.D.)
Murray Pyke Chair
Geological Sciences
University of Saskatchewan
114 Science Place
Saskatoon
SK
S7N 5E2
Canada

bruce.eglington at usask.ca<mailto:bruce.eglington at usask.ca>
+1-306-966-5732

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.sydney.edu.au/pipermail/gplates-discuss/attachments/20180408/3432b48f/attachment.html>


More information about the GPlates-discuss mailing list