This is an automated email from the git hooks/post-receive script. sebastic-guest pushed a commit to branch master in repository pktools.
commit ae2767408ba44d16aeeaf5051e72fb35faf67711 Author: Bas Couwenberg <sebas...@xs4all.nl> Date: Fri Dec 12 00:50:35 2014 +0100 Add man page for pksetmask. --- debian/changelog | 2 +- debian/man/pksetmask.1.xml | 291 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 292 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 55c8387..d9b4a5e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,7 @@ pktools (2.6.1-1) UNRELEASED; urgency=medium * Add man page for pkann, pkascii2img, pkascii2ogr, pkcomposite, pkcreatect, pkcrop, pkdiff, pkdsm2shadow, pkdumpimg, pkdumpogr, pkegcs, pkextract, pkfillnodata, pkfilter, pkfilterascii, pkfilterdem, pkfsann, pkfssvm, - pkgetmask, pkinfo, pklas2img, pkoptsvm, pkpolygonize, pkregann. + pkgetmask, pkinfo, pklas2img, pkoptsvm, pkpolygonize, pkregann, pksetmask. -- Bas Couwenberg <sebas...@xs4all.nl> Wed, 03 Dec 2014 21:16:31 +0100 diff --git a/debian/man/pksetmask.1.xml b/debian/man/pksetmask.1.xml new file mode 100644 index 0000000..6d8be90 --- /dev/null +++ b/debian/man/pksetmask.1.xml @@ -0,0 +1,291 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> +<refentry id='pksetmask'> + + <refmeta> + <refentrytitle>pksetmask</refentrytitle> + <manvolnum>1</manvolnum> + </refmeta> + + <refnamediv> + <refname>pksetmask</refname> + <refpurpose>program to apply mask image (set invalid values) to raster image</refpurpose> + </refnamediv> + + <refsynopsisdiv id='synopsis'> + <cmdsynopsis> + <command>pksetmask</command> + <arg choice='plain'><option>-i</option> <replaceable>input</replaceable></arg> + <arg choice='plain'><option>-m</option> <replaceable>mask</replaceable></arg> + <arg choice='opt'><option>-msknodata</option> <replaceable>value</replaceable></arg> + <arg choice='plain'><option>-o</option> <replaceable>output</replaceable></arg> + <arg choice='opt'><replaceable>options</replaceable></arg> + <arg choice='opt'><replaceable>advanced options</replaceable></arg> + </cmdsynopsis> + </refsynopsisdiv> + + <refsect1 id='description'> + <title>DESCRIPTION</title> + <para> + <command>pksetmask</command> sets a mask provided with option + <option>-m</option> to an input raster dataset. + The default operator is '='. + Values in the input raster data where the mask has a nodata value + (set with the option <option>-msknodata</option>) will then be set + to nodata (set with <option>-nodata</option>). + Other operators are less than (<option>--operator</option> '<') and + larger than (<option>--operator</option> '<'). + </para> + </refsect1> + + <refsect1 id='options'> + <title>OPTIONS</title> + <variablelist> + + <varlistentry> + <term><option>-i</option> <replaceable>filename</replaceable></term> + <term><option>--input</option> <replaceable>filename</replaceable></term> + <listitem> + <para> + Input image + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-m</option> <replaceable>mask</replaceable></term> + <term><option>--mask</option> <replaceable>mask</replaceable></term> + <listitem> + <para> + Mask image(s) + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-msknodata</option> <replaceable>value</replaceable></term> + <term><option>--msknodata</option> <replaceable>value</replaceable></term> + <listitem> + <para> + Mask value(s) where image has nodata. + Use one value for each mask, or multiple values for a single mask. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-o</option> <replaceable>filename</replaceable></term> + <term><option>--output</option> <replaceable>filename</replaceable></term> + <listitem> + <para> + Output mask file + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-nodata</option> <replaceable>value</replaceable></term> + <term><option>--nodata</option> <replaceable>value</replaceable></term> + <listitem> + <para> + nodata value to put in image if not valid + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-v</option> <replaceable>level</replaceable></term> + <term><option>--verbose</option> <replaceable>level</replaceable></term> + <listitem> + <para> + verbose + </para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Advanced options</para> + <variablelist> + + <varlistentry> + <term><option>-p</option> <replaceable>'<'|'='|'>'</replaceable></term> + <term><option>--operator</option> <replaceable>'<'|'='|'>'</replaceable></term> + <listitem> + <para> + Operator: < = > !. + Use operator for each <option>-msknodata</option> option + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-ot</option> <replaceable>type</replaceable></term> + <term><option>--otype</option> <replaceable>type</replaceable></term> + <listitem> + <para> + Data type for output image + ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}). + Empty string: inherit type from input image + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-of</option> <replaceable>GDALformat</replaceable></term> + <term><option>--oformat</option> <replaceable>GDALformat</replaceable></term> + <listitem> + <para> + Output image format (see also + <citerefentry> + <refentrytitle>gdal_translate</refentrytitle> + <manvolnum>1</manvolnum> + </citerefentry>). + Empty string: inherit from input image + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-co</option> <replaceable>option</replaceable></term> + <term><option>--co</option> <replaceable>option</replaceable></term> + <listitem> + <para> + Creation option for output file. + Multiple options can be specified. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-ct</option> <replaceable>filename</replaceable></term> + <term><option>--ct</option> <replaceable>filename</replaceable></term> + <listitem> + <para> + colour table in ASCII format having 5 columns: id R G B ALFA + (0: transparent, 255: solid) + </para> + </listitem> + </varlistentry> + + </variablelist> + + </refsect1> + + <refsect1 id='example'> + <title>EXAMPLE</title> + + <example> + <title>Using a single mask</title> + + <para> + With a single mask you can provide as many triples + (<option>--operator</option>, <option>--msknodata</option>, + <option>--nodata</option>) as you wish. + All operators work simultaneously on that mask. + Caution: the first operator that tests true will be selected. + This is explained in the next example: + </para> + <screen> +<command>pksetmask</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-m</option> <replaceable>mask.tif</replaceable> <option>--operator</option>='>' <option>--msknodata</option> <replaceable>0</replaceable> <option>--nodata</option> <replaceable>0</replaceable> <option>--operator</option>='>' <option>--msknodata</option> <replaceable>10</replaceable> <option>--nodata</option> <replaceable>10</replaceable> <option>-o</option> <replaceable>output.tif</replaceable> + </screen> + <para> + Warning: second operator will never test true as first will supersede! + </para> + <screen> +<command>pksetmask</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-m</option> <replaceable>mask.tif</replaceable> <option>--operator</option>='>' <option>--msknodata</option> <replaceable>10</replaceable> <option>--nodata</option> <replaceable>10</replaceable> <option>--operator</option>='>' <option>--msknodata</option> <replaceable>0</replaceable> <option>--nodata</option> <replaceable>1</replaceable> <option>-o</option> <replaceable>output.tif</replaceable> + </screen> + <para> + OK: values above 10 will be 10, values between 0 and 10 will be 1 + </para> + </example> + + <example> + <title>Using multiple masks</title> + + <para> + With multiple masks, you can use one triple + (<option>--operator</option>, <option>--msknodata</option>, + <option>--nodata</option>) for each corresponding mask + (following the same order of input). + If the number of triples is not equal to the number of masks, + then only the first triple is used for all masks simultaneously + </para> + <screen> +<command>pksetmask</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-m</option> <replaceable>mask1.tif</replaceable> <option>--operator</option> '>' <option>--msknodata</option> <replaceable>250</replaceable> <option>--nodata</option> <replaceable>1</replaceable> <option>-m</option> <replaceable>mask2.tif</replaceable> <option>--operator</option> '>' <option>--msknodata</option> <replaceable>100</replaceable> <option>--nodata</option> <replaceable>2</repla [...] + </screen> + <para> + If mask1.tif is above 250, the output will be 1. + If mask2 is above 100, the output will be 2. + If both operators test true, the first will supersede + (output will be 1) + </para> + <screen> +<command>pksetmask</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-m</option> <replaceable>mask1.tif</replaceable> <option>-m</option> <replaceable>mask2.tif</replaceable> <option>--operator</option> '>' <option>--msknodata</option> <replaceable>250</replaceable> <option>--nodata</option> <replaceable>1</replaceable> <option>-o</option> <replaceable>output.tif</replaceable> + </screen> + <para> + If either mask1.tif or mask2.tif is above 250, the output will be 1 + </para> + </example> + + <example> + <title>More examples</title> + + <screen> +<command>pksetmask</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-m</option> <replaceable>mask.tif</replaceable> <option>-o</option> <replaceable>output.tif</replaceable> <option>-ot</option> <replaceable>Byte</replaceable> <option>--msknodata</option> <replaceable>0</replaceable> <option>-nodata</option> <replaceable>255</replaceable> + </screen> + <para> + copy pixel values from input.tif to output.tif, applying mask.tif, + setting all values to 255 where mask is 0. + </para> + + <screen> +<command>pksetmask</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-m</option> <replaceable>mask.tif</replaceable> <option>-o</option> <replaceable>output.tif</replaceable> <option>-ot</option> <replaceable>Byte</replaceable> <option>--msknodata</option> <replaceable>1</replaceable> <option>-nodata</option> <replaceable>255</replaceable> <option>--operator</option> '!' + </screen> + <para> + copy values from input.tif to output.tif, + but set all values to 255 if mask is not 1 + </para> + + <screen> +<command>pksetmask</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-m</option> <replaceable>mask1.tif</replaceable> <option>-m</option> <replaceable>mask2.tif</replaceable> <option>-o</option> <replaceable>output.tif</replaceable> <option>-ot</option> <replaceable>Byte</replaceable> <option>--msknodata</option> <replaceable>0</replaceable> <option>-nodata</option> <replaceable>255</replaceable> + </screen> + <para> + Application of two masks. + Copy pixel values from input.tif to output.tif, + setting all values to 255 where either mask is 0. + </para> + + <screen> +<command>pksetmask</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-m</option> <replaceable>mask.tif</replaceable> <option>-o</option> <replaceable>output.tif</replaceable> <option>-ot</option> <replaceable>Byte</replaceable> <option>--msknodata</option> <replaceable>0</replaceable> <option>--msknodata</option> <replaceable>1</replaceable> <option>-nodata</option> <replaceable>255</replaceable> <option>-nodata</option> <replaceable>255</replaceable> + </screen> + <para> + copy pixel values from input.tif to output.tif, applying single masks, setting all values to 255 where mask is either 0 or 1. + </para> + </example> + + </refsect1> + + <refsect1 id='faq'> + <title>FAQ</title> + + <example> + <para> + Q1. I want to mask my input image (a byte image with values between + 0 and 254) with a mask that only covers a spatial subset of the input + image. + Within the spatial subset of the primary mask, all pixels must be set + to 0 where the primary mask equals 1. + Outside the spatial subset I want to set all pixel values to 255. + </para> + <para> + A1. This can be done using two masks, selecting the input image as the + secondary mask. + Choose the secondary operator acting on the secondary mask such that + the condition is always true (e.g, < 255). + </para> + </example> + + </refsect1> + +</refentry> -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pktools.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel