[Qgis-user] Trying to extract ocean part using Raster > Extraction > Clipper

Shriramana Sharma samjnaa at gmail.com
Thu Mar 13 08:16:20 PDT 2014


Hello. I'm using the Natural Earth data with QGIS and am trying to
solve the problem I described at
http://www.naturalearthdata.com/forums/topic/where-do-i-get-water-image-separately/
(and also previously mentioned on this list). Basically I want to
extract the ocean part of
http://www.naturalearthdata.com/downloads/10m-cross-blend-hypso/cross-blended-hypso-with-shaded-relief-water-and-drainages/
(HYP_HR_SR_W_DR) and put it on top of
http://www.naturalearthdata.com/downloads/10m-cross-blend-hypso/cross-blended-hypso/
(HYP_HR) since I don't want the shaded relief.

So after loading the HYP_HR_SR_W_DR and the ne_10m_ocean SHP layers in
a project, I do:

Raster > Extraction > Clipper
Input File: HYP_HR_SR_W_DR
Mask Layer: ne_10m_ocean

But after the long clipping process I find that the non-ocean part
becomes black and not transparent, see attachment. This makes it
useless because I can neither place the newly produced layer above the
HYP_HR layer (which blocks the land areas from the latter) nor below
it (which blocks the ocean areas from the former).

I tried doing convert Ocean.tiff -transparent black OceanTrans.tiff
using ImageMagick and sure enough the transparency is produced, but
trying to load that layer in QGIS (setting the coordinates system to
WGS84) just makes it appear as a huge version of the layer with black
in it.

Hence it would be good if there was a way to produce the transparency
within QGIS itself (i.e. the GDAL etc that it uses). But man gdalwarp
doesn't seem  to provide an option for that. Personally I'm not sure
what clipping is above if it doesn't really produce transparency and
hence am unable to understand why GDAL produces a black clipped area.

Anyhow, I hope somebody can help me out of this predicament. Thank you
very much for your time!

--
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OceanShading.png
Type: image/png
Size: 24836 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140313/fcbef012/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OceanShadingTrans.png
Type: image/png
Size: 25692 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140313/fcbef012/attachment-0001.png>


More information about the Qgis-user mailing list