comparison gdalinfo.xml @ 0:c59d7204b3ce draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tools/gdal commit b964e8f7d7bb076d63a1c7bdfbbdba0f9074d517
author ecology
date Tue, 26 Feb 2019 11:50:09 -0500
parents
children 5ecef27d7adc
comparison
equal deleted inserted replaced
-1:000000000000 0:c59d7204b3ce
1 <tool id="gdal_gdalinfo" name="GDAL Informations" version="@VERSION@">
2 <description>lists information about a raster dataset</description>
3 <macros>
4 <import>gdal_macros.xml</import>
5 </macros>
6 <expand macro="gdal_requirements" />
7 <command detect_errors="exit_code"><![CDATA[
8 gdalinfo '$input1'
9 #if $settings.advanced=='advanced'
10 $settings.mm
11 $settings.stats
12 $settings.approx_stats
13 $settings.hist
14 $settings.nogcp
15 $settings.nomd
16 $settings.norat
17 $settings.noct
18 $settings.checksum
19 $settings.listmdd
20 $settings.proj4
21 -mdd '$settings.mdd'
22 #end if
23 #if $format.value=='json'
24 -json > '$outputJson';
25 #if $subdataset=='subd_y'
26 cat '$outputJson' | grep -A 1 "\"SUBDATASET_._NAME\":\".*\"," | cut -d "\"" -f4- | sed 's/..$//' | sed 's/\t//' | sed -e 'N; s/\n/\t/' > Subdatasets.tabular
27 #end if
28 #else
29 > '$outputDefault';
30 #if $subdataset=='subd_y'
31 cat '$outputDefault' | grep -A 1 "SUBDATASET_._NAME=.*:.*$" | cut -d "=" -f 2 | sed 's/\t//' | sed -e 'N; s/\n/\t/' > Subdatasets.tabular
32 #end if
33 #end if
34 ]]></command>
35 <inputs>
36 <param type="data" name="input1" label="Gdal supported raster input file" format="tif,netcdf,tiff,vrt" help="Currently supported format are GTiff,VRT and netCDF."/>
37 <param name="format" type="select" label="Output format" multiple="False">
38 <option value="default" selected="true">Text</option>
39 <option value="json">Json</option>
40 </param>
41 <param name="subdataset" type="select" label="Create list of potential subdatasets" multiple="False" help="If set to yes, a tabular file will be created with a list of all subdatasets. Use this to later perform actions on custom subdata with gdal tranlsate.">
42 <option value="subd_y">Yes</option>
43 <option value="subd_n" selected="True">No</option>
44 </param>
45 <conditional name="settings">
46 <expand macro="gdal_advanced_params_select"/>
47 <when value="advanced">
48 <param name="mm" type="boolean" truevalue="-mm" falsevalue="" checked="false" help="-mm" label="Force computation of the actual min/max values for each band in the dataset."/>
49 <expand macro="gdal_param_stats"/>
50 <param name="approx_stats" type="boolean" truevalue="-approx_stats" falsevalue="" checked="false" help="-approx_stats. However, they may be computed based on overviews or a subset of all tiles. Useful if you are in a hurry and don't want precise stats." label="Read and display image statistics."/>
51 <param name="hist" type="boolean" truevalue="-hist" falsevalue="" checked="false" help="-hist" label="Report histogram information for all bands."/>
52 <param name="nogcp" type="boolean" truevalue="-nogcp" falsevalue="" checked="false" help="-nogcp" label="Suppress ground control points list printing."/>
53 <param name="nomd" type="boolean" truevalue="-nomd" falsevalue="" checked="false" help="-nomd. Some datasets may contain a lot of metadata strings" label="Suppress metadata printing."/>
54 <expand macro="gdal_param_norat"/>
55 <param name="noct" type="boolean" truevalue="-noct" falsevalue="" checked="false" help="-noct" label="Suppress printing of color table."/>
56 <param name="checksum" type="boolean" truevalue="-checksum" falsevalue="" checked="false" help="-checksum" label="Force computation of the checksum for each band in the dataset."/>
57 <param name="listmdd" type="boolean" truevalue="-listmdd" falsevalue="" checked="false" help="-listmdd" label="List all metadata domains available for the dataset."/>
58 <param name="proj4" type="boolean" truevalue="-proj4" falsevalue="" checked="false" help="-proj4 String corresponding to the file's coordinate system" label="Report a PROJ.4 string."/>
59 <param name="mdd" type="text" help="-mdd DOMAIN" label="Report metadata for the specified domain." value="all">
60 <validator type="expression" message="mdd option can't be an empty value">value.strip()</validator>
61 </param>
62 </when>
63 </conditional>
64 </inputs>
65
66 <outputs>
67 <data name="outputDefault" format="txt" label="Default info file">
68 <filter>format == "default"</filter>
69 </data>
70 <data name="outputJson" format="json" label="Json formated info file">
71 <filter>format == "json"</filter>
72 </data>
73 <data name="subdatasets" format="tabular" from_work_dir="Subdatasets.tabular" label="Subdatasets from ${input1.name}">
74 <filter>subdataset == "subd_y"</filter>
75 </data>
76 </outputs>
77
78 <tests>
79 <test>
80 <param name="input1" value="stere.tif"/>
81 <param name="format" value="json" />
82 <param name="subdataset" value="subd_n" />
83 <param name="advanced" value="simple"/>
84 <output name="outputJson" file="stere_info.json" lines_diff="6"/>
85 </test>
86 <test>
87 <param name="input1" value="stere.tif"/>
88 <param name="format" value="default" />
89 <param name="subdataset" value="subd_n" />
90 <param name="advanced" value="advanced"/>
91 <param name="stats" value="-stats"/>
92 <param name="hist" value="-hist"/>
93 <param name="checksum" value="-checksum"/>
94 <param name="mdd" value="all"/>
95 <output name="outputDefault" file="stere_advanced_info.txt" lines_diff="6"/>
96 </test>
97 </tests>
98
99 <help><![CDATA[
100 ==========================
101 Gdalinfo
102 ==========================
103 **What it does**
104
105 The gdalinfo program lists various information about a GDAL supported raster dataset.
106
107 It will report all of the following (if known):
108
109 - The format driver used to access the file.
110 - Raster size (in pixels and lines).
111 - The coordinate system for the file (in OGC WKT).
112 - The geotransform associated with the file (rotational coefficients are currently not reported).
113 - Corner coordinates in georeferenced, and if possible lat/long based on the full geotransform (but not GCPs).
114 - Ground control points.
115 - File wide (including subdatasets) metadata.
116 - Band data types.
117 - Band color interpretations.
118 - Band block size.
119 - Band descriptions.
120 - Band min/max values (internally known and possibly computed).
121 - Band checksum (if computation asked).
122 - Band NODATA value.
123 - Band overview resolutions available.
124 - Band unit type (i.e.. "meters" or "feet" for elevation bands).
125 - Band pseudo-color tables.
126
127 |
128
129 **How to use it**
130
131 Select from history a suported raster file and choose either Json or Text format for result display.
132
133 An additional option can list available subdatasets.
134
135 |
136
137 **Advanced options and sources**
138
139 To see complete details and help section please check the official gdal sources.
140
141 http://www.gdal.org
142
143 http://www.gdal.org/gdalinfo.html
144
145 Raster Processing Tutorial : https://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial
146
147
148 ]]></help>
149 <expand macro="gdal_citation"/>
150 </tool>