Repository 'gdal_gdaladdo'
hg clone https://toolshed.g2.bx.psu.edu/repos/ecology/gdal_gdaladdo

Changeset 0:ea0416ac16d0 (2019-02-26)
Next changeset 1:4d9e2b1c73f4 (2019-02-27)
Commit message:
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tools/gdal commit b964e8f7d7bb076d63a1c7bdfbbdba0f9074d517
added:
gdal_macros.xml
gdaladdo.xml
test-data/stere.tif
test-data/stere.tif.ovr
b
diff -r 000000000000 -r ea0416ac16d0 gdal_macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gdal_macros.xml Tue Feb 26 11:51:19 2019 -0500
b
b'@@ -0,0 +1,164 @@\n+<macros>\n+    <token name="@VERSION@">2.4.0</token>  \n+    <xml name="gdal_requirements">\n+        <requirements>\n+            <requirement type="package" version="2.1.0">gdal</requirement>\n+            <requirement type="package" version="3.5.0">geos</requirement>\n+        </requirements>\n+    </xml>\n+\n+    <xml name="gdal_advanced_params_select">\n+        <param name="advanced" type="select" label="Specify advanced parameters">\n+            <option value="simple" selected="true">No, use program defaults.</option>\n+            <option value="advanced">Yes, see full parameter list.</option>\n+        </param>        \n+        <when value="simple">\n+        </when>\n+    </xml>\n+\n+    <xml name="gdal_param_te">\n+        <conditional name="condi_te">\n+            <param name="te" type="select" label="Georeferenced extents of output file" help="-te xmin ymin xmax ymax">\n+                <option value="no_te" selected="true">Don\'t use the -te option</option>\n+                <option value="te">Use the -te option</option>\n+            </param>\n+            <when value="no_te">\n+            </when>\n+            <when value="te">\n+                <param name="xmin" type="float" label="xmin" value="0" min="0" help="In target SRS by default, or in the SRS specified with -te_srs"/>\n+                <param name="ymin" type="float" label="ymin" value="0" min="0" help="In target SRS by default, or in the SRS specified with -te_srs"/>\n+                <param name="xmax" type="float" label="xmax" value="0" min="0" help="In target SRS by default, or in the SRS specified with -te_srs"/>\n+                <param name="ymax" type="float" label="ymax" value="0" min="0" help="In target SRS by default, or in the SRS specified with -te_srs"/>\n+            </when>\n+        </conditional> \n+    </xml>\n+\n+    <xml name="gdal_param_r">\n+        <conditional name="condi_resample">\n+            <param label="Use a resampling method" help="-r resampling algorithm" name="resample" type="select">\n+                <option value="no_resampling" selected="true">Don\'t use a resampling method</option>\n+                <option value="resampling">Use a resampling method, option -r</option>\n+            </param>\n+            <when value="resampling">\n+                <param name="r" type="select" label="Reseampling algorithm" >\n+                    <option value="nearest" selected="true"/>\n+                    <option value="bilinear"/>\n+                    <option value="cubic"/>\n+                    <option value="cubicspline"/>\n+                    <option value="lanczos"/>\n+                    <option value="average"/>\n+                    <option value="mode"/>\n+                    <option value="max"/>\n+                    <option value="min"/>\n+                    <option value="med">Median resampling</option>\n+                    <option value="q1">First quartile resampling</option>\n+                    <option value="q2">Third quartile resampling</option>\n+                </param>\n+            </when>\n+            <when value="no_resampling">\n+            </when>\n+        </conditional>\n+    </xml>\n+\n+    <xml name="gdal_param_tr">\n+        <conditional name="condi_tr">\n+            <param name="tr" type="select" label="Set the ouput file resolution" help="-tr xres yres. Set output file resolution (in target georeferenced units)"> \n+                <option value="no_tr" selected="true">Don\'t use the -tr option</option>\n+                <option value="tr">Use the -tr option</option>\n+            </param>\n+            <when value="no_tr">\n+            </when>\n+            <when value="tr">\n+                <param name="xres" type="float" label="xres" value="0" min="0"/>\n+                <param name="yres" type="float" label="yres" value="0" min="0"/>\n+            </when>\n+        </conditional>\n+    </xml>\n+\n+    <xml name="gdal_param_b">\n+        <param name="b" type="text" label="Select an input band band for output" help="eg : -b band -b 1'..b'falsevalue="" checked="false" label="Place each input file into a separate band" help="-separate. In that case, only the first band of each dataset will be placed into a new band. Contrary to the default mode, it is not required that all bands have the same datatype" />\n+    </xml>\n+\n+    <xml name="gdal_param_a_srs">\n+        <param name="a_srs" type="text" label="Override the projection for the output file" help="-a_srs srs_def. The srs_def may be any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT. No reprojection is done" value="" />\n+    </xml>\n+\n+    <xml name="gdal_param_stats">\n+        <param name="stats" type="boolean" truevalue="-stats" falsevalue="" checked="false" label="Force (re)computation of statistics"  help="-stats. Read and display image statistics. Force computation if no statistics are sto.red in an image."/>\n+    </xml>\n+    \n+    <xml name="gdal_param_norat">\n+        <param name="norat" type="boolean" truevalue="-norat" falsevalue="" checked="false" help="-norat. Do not copy source RAT into destination dataset." label="Suppress printing of raster attribute table."/>\n+    </xml>\n+\n+    <xml name="gdal_param_of">\n+        <param name="of" type="select" label="Output format -of" value="Gtiff" help="Select the output format. The default is GeoTIFF (GTiff). A short list of raster formats is currently enable in GalaxyE : GTiff, netCDF and VRT.">\n+            <option value="GTiff">GTiff</option>\n+            <option value="netCDF">Network Common Data Format - netCDF</option>\n+            <option value="VRT">GDAL Virtual - VRT</option>\n+        </param>\n+    </xml>\n+\n+    <xml name="gdal_param_co">\n+        <param name="co" type="text" label="Pass a creation option to the output format driver" help="-co NAME=VALUE. eg : COMPRESS=JPEG" value="" />\n+    </xml>   \n+\n+    <xml name="gdal_param_ot">\n+        <param name="ot" type="select" label="Datatype of the output bands" help="-ot Datatype">\n+            <option value="byte">Byte</option>\n+            <option value="int16">Int16</option>\n+            <option value="uint16">UInt16</option>\n+            <option value="uint32">UInt32</option>\n+            <option value="int32">Int32</option>\n+            <option value="float32">Float32</option>\n+            <option value="float64">Float64</option>\n+            <option value="cint16">CInt16</option>\n+            <option value="cint32">CInt32</option>\n+            <option value="cfloat32">CFloat32</option>\n+            <option value="cfloat64">CFloat64</option>\n+            <option value="" selected="true">Select a datatype for the output bands (default)</option>\n+        </param>\n+    </xml>\n+\n+<!-- need to upgrade gdal version to use\n+    <xml name="gdal_param_oo">\n+        <param name="oo" type="text" label="-oo NAME=VALUE" value="" />\n+    </xml>\n+-->\n+\n+    <xml name="gdal_input_raster_multiple">\n+        <param type="data" name="input" format="gtiff,tiff,netcdf,VRT,txt,xml" help="Formats currently supported are : GTiff, netCDF and VRT" label="Gdal supported input file" multiple="true"/>\n+    </xml>\n+\n+    <xml name="gdal_output_change_format">\n+        <data name="output" format="GTiff" label="${on_string}.${of}">\n+            <change_format>\n+                <when input="of" value="GTiff" format="tiff"/>\n+                <when input="of" value="netCDF" format="netcdf"/>\n+                <when input="of" value="VRT" format="txt"/>\n+            </change_format>\n+        </data>\n+    </xml>\n+\n+    <xml name="gdal_citation">\n+        <citations>\n+            <citation type="bibtex">\n+                @Manual{,\n+                title = {{GDAL/OGR} Geospatial Data Abstraction software Library},\n+                author = {{GDAL/OGR contributors}},\n+                organization = {Open Source Geospatial Foundation},\n+                year = {2018},\n+                url = {http://gdal.org},\n+                }\n+            </citation>\n+        </citations>  \n+    </xml>\n+</macros>\n'
b
diff -r 000000000000 -r ea0416ac16d0 gdaladdo.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gdaladdo.xml Tue Feb 26 11:51:19 2019 -0500
[
@@ -0,0 +1,64 @@
+<tool id="gdal_gdaladdo" name="GDAL addo" version="@VERSION@">
+    <description>builds or rebuilds overview images</description>
+    <macros>
+        <import>gdal_macros.xml</import>
+    </macros>
+    <expand macro="gdal_requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+        gdaladdo '$input1'
+            -q
+            -ro
+            #if str($levels).strip()==''
+                -clean 
+            #else
+                '$levels'
+                --config COMPRESS_OVERVIEW DEFLATE
+                && cp '$input1''.ovr' 'output_ovr'
+            #end if
+    ]]></command>
+    
+    <inputs>
+        <param type="data" name="input1" label="Gdal supported raster input file" format="gtiff,tiff" help="Chose a GeoTIFF file"/>    
+        <param name="levels" type="text" label="levels" help="A list of integral overview levels to build. eg : 2 4 8 16" value=""/>        
+    </inputs>
+    
+    <outputs>
+        <data format="tiff" name="output" from_work_dir="output_ovr" label="${input1.name}.ovr"/>
+    </outputs>
+    
+    <tests> 
+        <test> 
+            <param name="input1" value="stere.tif"/>
+            <param name="levels" value="2 4 8 16" />
+            <output name="output" file="stere.tif.ovr"/>
+        </test>
+    </tests>
+    
+    <help><![CDATA[
+==========================
+Gdaladdo
+==========================
+**What it does**
+
+The gdaladdo utility can be used to build or rebuild overview images for most supported file formats with one of several downsampling algorithms. 
+
+|
+
+**How to use it**        
+
+Select a raster file from history and chose levels to build.
+
+|
+
+**Advanced options and sources**
+
+To see complete details and help section please check the official gdal sources.
+
+http://www.gdal.org
+
+http://www.gdal.org/gdaladdo.html
+
+Raster Processing Tutorial : https://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial
+    ]]></help>
+    <expand macro="gdal_citation"/>
+</tool>
b
diff -r 000000000000 -r ea0416ac16d0 test-data/stere.tif
b
Binary file test-data/stere.tif has changed
b
diff -r 000000000000 -r ea0416ac16d0 test-data/stere.tif.ovr
b
Binary file test-data/stere.tif.ovr has changed