Skip to content

Commit a0feba0

Browse files
committed
updated masking tutorial
1 parent c0b9d21 commit a0feba0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/source/howto/masks.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Option 1: from vector data to mask
5454

5555
FORCE comes with a program to generate processing masks from vector data (e.g. shapefile or geopackage):
5656

57-
.. code-block:: bash
57+
.. code-block:: none
5858
5959
force-cube -h
6060
@@ -101,7 +101,7 @@ Do not worry about data volume when converting from vector to raster data, becau
101101

102102
In the following example, we generate a processing mask for the administrative area of Vienna, Austria.
103103

104-
.. code-block:: bash
104+
.. code-block:: none
105105
106106
force-cube -o /data/europe/mask vienna.shp
107107
@@ -113,7 +113,7 @@ In the following example, we generate a processing mask for the administrative a
113113
114114
In this example, Vienna is covered by four tiles, a cubed GeoTiff was generated in each tile:
115115

116-
.. code-block:: bash
116+
.. code-block:: none
117117
118118
ls /data/europe/mask/X*/vienna.tif
119119
@@ -125,7 +125,7 @@ In this example, Vienna is covered by four tiles, a cubed GeoTiff was generated
125125
126126
For speedy visuailzation, build overviews and pyramids:
127127

128-
.. code-block:: bash
128+
.. code-block:: none
129129
130130
force-pyramid /data/europe/mask/X*/*.tif
131131
force-mosaic /data/europe/mask
@@ -153,7 +153,7 @@ Option 2: from raster data to mask
153153

154154
FORCE comes with a program to generate processing masks from a raster image with continuous values:
155155

156-
.. code-block:: bash
156+
.. code-block:: none
157157
158158
force-procmask -h
159159
@@ -193,7 +193,7 @@ which gives the percentages of built-up land (urban), high vegetation (trees), a
193193

194194
In our case, the data are already in datacube format, covering 597 tiles:
195195

196-
.. code-block:: bash
196+
.. code-block:: none
197197
198198
cd /data/europe/pred
199199
ls X*/*.tif | head
@@ -218,7 +218,7 @@ If this is a multiband file, the desired band can be specified with the ``-l`` o
218218
In our example input image, the tree percentage is in band 2 and the percentage values are scaled by 100 (i.e. 100% = 10000).
219219
To generate a mask with tree cover > 30%, we use the following:
220220

221-
.. code-block:: bash
221+
.. code-block:: none
222222
223223
cd /data/europe/pred
224224
@@ -239,7 +239,7 @@ To generate a mask with tree cover > 30%, we use the following:
239239
240240
We now have one cubed mask for each input image in the mask directory:
241241

242-
.. code-block:: bash
242+
.. code-block:: none
243243
244244
ls /data/europe/mask/X*/forest-mask.tif | wc -l
245245
@@ -248,7 +248,7 @@ We now have one cubed mask for each input image in the mask directory:
248248
249249
For speedy visuailzation, build overviews and pyramids:
250250

251-
.. code-block:: bash
251+
.. code-block:: none
252252
253253
force-pyramid /data/europe/mask/X*/forest-mask.tif
254254
force-mosaic /data/europe/mask
@@ -279,7 +279,7 @@ Processing masks can easily be used in ``force-higher-level`` by setting the ``D
279279
They are the parent directory of the cubed masks, and the basename of the masks, respectively.
280280
To use the Vienna mask from above:
281281

282-
.. code-block:: bash
282+
.. code-block:: none
283283
284284
DIR_MASK = /data/europe/mask
285285
BASE_MASK = vienna.tif

0 commit comments

Comments
 (0)