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

Changeset 0:1ac517097024 (2019-02-26)
Next changeset 1:e97b907e9602 (2019-02-27)
Commit message:
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tools/gdal commit b964e8f7d7bb076d63a1c7bdfbbdba0f9074d517
added:
gdal_macros.xml
gdal_translate.xml
test-data/tinyworld.png
test-data/tinyworld.tif
b
diff -r 000000000000 -r 1ac517097024 gdal_macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gdal_macros.xml Tue Feb 26 11:49:47 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 1ac517097024 gdal_translate.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gdal_translate.xml Tue Feb 26 11:49:47 2019 -0500
[
b'@@ -0,0 +1,259 @@\n+<tool id="gdal_gdal_translate" name="GDAL Translate" version="@VERSION@">\n+    <description>converts raster data between different formats.</description>\n+    <macros>\n+        <import>gdal_macros.xml</import>\n+    </macros>\n+    <expand macro="gdal_requirements" />\n+\n+    <command detect_errors="exit_code"><![CDATA[\n+        gdal_translate \n+\n+            \'$typeinput.input1\' \'$output\'\n+            #if $settings.advanced==\'advanced\'\n+                \n+                #if str($settings.ot).strip()!=\'\'\n+                    -ot $settings.ot\n+                #end if\n+\n+                $settings.strict\n+                \n+                #if str($settings.b).strip()!=\'\'\n+                    $settings.b\n+                #end if\n+                \n+                #if str($settings.mask).strip()!=\'\'\n+                    \'$settings.mask\'\n+                #end if\n+                \n+                #if $settings.condi_resample.resample==\'resampling\'\n+                    -r $settings.condi_resample.r\n+                #end if\n+\n+                #if $settings.outsize.outsize==\'outsize_x\'\n+                    -outsize xsize $settings.outsize.outx$settings.outsize.outsize_percent\n+                #else\n+                    -outsize ysize $settings.outsize.outy$settings.outsize.outsize_percent\n+                #end if\n+                        \n+                #if $settings.condi_expand.expand==\'expand\'\n+                    -expand $settings.condi_expand.expand_value\n+                #end if\n+                \n+                #if $settings.condi_scale.scale==\'scale\'\n+                    -scale $settings.condi_scale.src_min $settings.condi_scale.src_max $settings.condi_scale.dst_min $settings.condi_scale.dst_max\n+                #end if\n+                    \n+                #if $settings.condi_srcwin.srcwin==\'srcwin\'\n+                    -srcwin $settings.condi_srcwin.xoff $settings.condi_srcwin.yoff $settings.condi_srcwin.xsize $settings.condi_srcwin.ysize\n+                #end if\n+                \n+                #if $settings.condi_a_ullr.a_ullr==\'a_ullr\'\n+                    -a_ullr $settings.condi_a_ullr.ulx $settings.condi_a_ullr.uly $settings.condi_a_ullr.lrx $settings.condi_a_ullr.lry\n+                #end if\n+                \n+                $settings.epoeco\n+                ## $settings.sds\n+                $settings.stats\n+                $settings.norat\n+                \n+                #if str($settings.co).strip()!=\'\'\n+                    -co \'$settings.co\'\n+                #end if\n+                \n+                #if str($settings.mo).strip()!=\'\'\n+                    -mo \'$settings.mo\'\n+                #end if\n+                \n+##                #if str($settings.oo).strip()!=\'\'\n+##                    -oo \'$settings.oo\'\n+##                #end if\n+                \n+                #if str($settings.a_srs).strip()!=\'\'\n+                    -a_srs \'$settings.a_srs\'\n+                #end if\n+                            \n+            #end if\n+            -q \n+            -of \'$of\'\n+        \n+    ]]></command>\n+    <inputs>\n+        <conditional name="typeinput">\n+            <param type="select" name="input" label="Gdal raster supported input file" help="Choose between GTiff,VRT or netCDF. To perform a translate on a subdataset use the gdal information option \'create list of potential subdatasets\' to have the usable subdatasets in a file. Then select this file and the subdataset you want to use.">\n+                <option value="dataset">Data file</option>\n+                <option value="subdataset">Subdataset</option>\n+            </param>\n+            <when value="dataset">\n+                <param type="data" label="Input data" format="data" help="Select a file you want to convert in GTiff, VRT or netCDF" name="input1"/>\n+            </when>    \n+            <when value="subdataset">\n+                <param type="data" label="Tabular of subdatasets" name="subdata_tab"/>\n+                <param name="input1"'..b'               <param name="xsize" type="integer" label="xsize" value="0" min="0"/>\n+                        <param name="ysize" type="integer" label="ysize" value="0" min="0"/>\n+                    </when>\n+                </conditional>\n+                <conditional name="condi_a_ullr">\n+                    <param name="a_ullr" type="select" label="Assign/override the georeferenced bounds of the output file" help="-a_ullr ulx uly lrx lry. This assigns georeferenced bounds to the output file, ignoring what would have been derived from the source file. So this does not cause reprojection to the specified SRS" >\n+                        <option value="no_a_ullr" selected="true">Don\'t use the -a_ullr option</option>\n+                        <option value="a_ullr">Use the -a_ullr option</option>\n+                    </param>\n+                    <when value="no_a_ullr">\n+                    </when>\n+                    <when value="a_ullr">\n+                        <param name="ulx" type="integer" label="ulx" value="0"/>\n+                        <param name="uly" type="integer" label="uly" value="0"/>\n+                        <param name="lrx" type="integer" label="lrx" value="0"/>\n+                        <param name="lry" type="integer" label="lry" value="0"/>\n+                    </when>\n+                </conditional>\n+                <param name="epoeco" type="select" label="Display error when outside the source raster" multiple="False">\n+                    <option value="" selected="true">Default, no error</option>\n+                    <option value="-epo">-epo : Error when partially outside</option>\n+                    <option value="-eco">-eco : Error when completely outside</option>\n+                </param>\n+                <param name="a_srs" type="text" label="Override the projection" help="-a_srs. 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+\n+                <!--\n+                <param name="sds" type="boolean" truevalue="-sds" falsevalue="" checked="false" label="-sds" help="Copy all subdatasets of this file to individual output files. Use with formats like HDF or OGDI that have subdatasets. The output file naming scheme has changed in GDAL 1.11 (e.g. ofile_1.tif, ofile_2.tif)."/>\n+                Ici il y a surement une gestion de fichiers de sorties multiple \xc3\xa0 faire\n+                -->\n+                \n+            </when>\n+        </conditional>\n+    </inputs>\n+    \n+    <outputs>\n+        <expand macro="gdal_output_change_format"/>  \n+    </outputs>\n+    \n+    \n+    <tests>\n+        <test>\n+            <param name="input1" value="tinyworld.png"/>\n+            <param name="of" value="GTiff" />\n+            <param name="advanced" value="advanced"/>\n+            <param name="a_ullr" value="a_ullr"/>\n+            <param name="ulx" value="-180"/>\n+            <param name="uly" value="90"/>\n+            <param name="lrx" value="180"/>\n+            <param name="lry" value="-90"/>\n+            <param name="a_srs" value="WGS84"/>\n+            <output name="output" file="tinyworld.tif"/>\n+        </test>\n+    </tests>\n+    \n+    <help><![CDATA[\n+===============\n+Gdal_translate\n+===============\n+\n+**What it does**\n+        \n+The gdal_translate utility can be used to convert raster data between different formats, potentially performing some operations like subsettings, resampling, and rescaling pixels in the process. \n+\n+|\n+\n+**How to use it**\n+\n+Select from history a raster file/subdataset.\n+\n+Specifiy output format using short name (http://www.gdal.org/formats_list.html).\n+\n+|\n+\n+**Advanced options and sources**\n+\n+To see complete details and help section please check the official gdal sources.\n+\n+http://www.gdal.org\n+\n+http://www.gdal.org/gdal_translate.html\n+\n+Raster Processing Tutorial : https://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial\n+    ]]></help>\n+    <expand macro="gdal_citation"/>\n+</tool>\n'
b
diff -r 000000000000 -r 1ac517097024 test-data/tinyworld.png
b
Binary file test-data/tinyworld.png has changed
b
diff -r 000000000000 -r 1ac517097024 test-data/tinyworld.tif
b
Binary file test-data/tinyworld.tif has changed