Marble/Sentinel2Bathymetry: Difference between revisions

From KDE Community Wiki
*>Tackat phab
m (13 revisions imported)
 
(8 intermediate revisions by one other user not shown)
Line 7: Line 7:
First download the [http://data.openstreetmapdata.com/land-polygons-complete-4326.zip WGS land polygon shapefile]. Unzip the shape file. Then choose '''Layer->Add Layer->Add Vector Layer''' and load the shape file into QGIS. Right-Click the layer's square icon in the legend and click '''Properties'''. In the Style tab click the '''Simple Fill''' and the '''Fill''' combobox. Then choose the color "#000000" (black).
First download the [http://data.openstreetmapdata.com/land-polygons-complete-4326.zip WGS land polygon shapefile]. Unzip the shape file. Then choose '''Layer->Add Layer->Add Vector Layer''' and load the shape file into QGIS. Right-Click the layer's square icon in the legend and click '''Properties'''. In the Style tab click the '''Simple Fill''' and the '''Fill''' combobox. Then choose the color "#000000" (black).
Then choose '''Project->Save As''' and save the project as coastline.qgs . Quit the QGIS application.
Then choose '''Project->Save As''' and save the project as coastline.qgs . Quit the QGIS application.
<source>
qgis --snapshot coastline.png --width 16200 --height 8100 --project coastline.qgs
</source>
Open the resulting coastline.png. Then choose the '''Crop tool''' and select the area starting at the top edge of the canvas and the left border where russia is cut off. Drag the selection area down to the bottom right corner of Antarctica. Then crop the image.
Now choose '''Image->Canvas Size''', reduce the height to half the width, drag the map upwards and press '''Resize'''. Choose
'''Filters->Distorts->Value Propagate'''
and select '''More black''' and choose 0, 255, 1.0  as values in the Propagate section. Now perform the same Value Propagation a second time and a third time again. You might now want to save the file using the filename coastline_outlined.png by selecting File->Export As... . Copy the whole layer by pressing Ctrl-C. Then perform the Value Propagation a third time.
Select '''Filters->Blur->Gaussian Blur''', use a '''Blur Radius''' of 5 pixels. Then paste the previously copied layer, move the unblurred layer on top and assign the blending filter "Darken only" to the unblurred layer. Merge both layers.
Scale the result layer up to 16200x8100.
Finally save the resulting file using the file name coastline_mask.png .

Latest revision as of 08:05, 21 October 2016

Creating the Bathymetry

This page exists mostly for documentation purposes. For actually applying the bathymetry follow our general instructions here.

Creating the Mask

First download the WGS land polygon shapefile. Unzip the shape file. Then choose Layer->Add Layer->Add Vector Layer and load the shape file into QGIS. Right-Click the layer's square icon in the legend and click Properties. In the Style tab click the Simple Fill and the Fill combobox. Then choose the color "#000000" (black). Then choose Project->Save As and save the project as coastline.qgs . Quit the QGIS application.

qgis --snapshot coastline.png --width 16200 --height 8100 --project coastline.qgs

Open the resulting coastline.png. Then choose the Crop tool and select the area starting at the top edge of the canvas and the left border where russia is cut off. Drag the selection area down to the bottom right corner of Antarctica. Then crop the image. Now choose Image->Canvas Size, reduce the height to half the width, drag the map upwards and press Resize. Choose

Filters->Distorts->Value Propagate

and select More black and choose 0, 255, 1.0 as values in the Propagate section. Now perform the same Value Propagation a second time and a third time again. You might now want to save the file using the filename coastline_outlined.png by selecting File->Export As... . Copy the whole layer by pressing Ctrl-C. Then perform the Value Propagation a third time. Select Filters->Blur->Gaussian Blur, use a Blur Radius of 5 pixels. Then paste the previously copied layer, move the unblurred layer on top and assign the blending filter "Darken only" to the unblurred layer. Merge both layers. Scale the result layer up to 16200x8100.

Finally save the resulting file using the file name coastline_mask.png .