Mercurial > repos > ecology > gdal_ogr2ogr
comparison ogr2ogr.xml @ 3:e12db3b4d3a6 draft default tip
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/gdal commit b8d429fc9c59d401a4a55fcd806050939ed41b8b
author | ecology |
---|---|
date | Thu, 20 Jun 2019 06:53:44 -0400 |
parents | 22c54afd1cf3 |
children |
comparison
equal
deleted
inserted
replaced
2:22c54afd1cf3 | 3:e12db3b4d3a6 |
---|---|
3 <macros> | 3 <macros> |
4 <import>gdal_macros.xml</import> | 4 <import>gdal_macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="gdal_requirements" /> | 6 <expand macro="gdal_requirements" /> |
7 <command detect_errors="exit_code"><![CDATA[ | 7 <command detect_errors="exit_code"><![CDATA[ |
8 #if $input.is_of_type("tabular") | |
9 cp '$input' '$input''.tsv' && | |
10 #end if | |
8 ogr2ogr | 11 ogr2ogr |
9 -f '$f' | 12 -f '$f' |
10 #if $f=='ESRI Shapefile' | 13 #if $f=='ESRI Shapefile' |
11 'shapefile.shp' | 14 'shapefile.shp' |
12 #else | 15 #else |
13 'output' | 16 'output' |
14 #end if | 17 #end if |
15 #if $input.is_of_type("shp") | 18 #if $input.is_of_type("shp") |
16 ${os.path.join( $input.extra_files_path, 'shapefile.shp' )} | 19 ${os.path.join( $input.extra_files_path, 'shapefile.shp' )} |
17 #else | 20 #else if $input.is_of_type("tabular") |
21 '$input''.tsv' | |
22 #else | |
18 '$input' | 23 '$input' |
24 #end if | |
25 #if $settings.advanced=='advanced' | |
26 #for $i in $settings.series_oo | |
27 #if str('${i.oo}').strip()!='' | |
28 -oo ${i.oo} | |
29 #end if | |
30 #end for | |
19 #end if | 31 #end if |
20 #if $f=='ESRI Shapefile' | 32 #if $f=='ESRI Shapefile' |
21 && | 33 && |
22 mkdir ${shapefile.extra_files_path} && | 34 mkdir ${shapefile.extra_files_path} && |
23 mv shapefile.* ${shapefile.extra_files_path} | 35 mv shapefile.* ${shapefile.extra_files_path} |
24 #end if | 36 #end if |
25 ]]></command> | 37 ]]></command> |
26 <inputs> | 38 <inputs> |
27 <param type="data" name="input" format="shp,xml,json,txt" label="Gdal supported input file" help="http://www.gdal.org/ogr_formats.html"/> | 39 <param type="data" name="input" format="shp,xml,json,tabular,txt" label="Gdal supported input file" help="http://www.gdal.org/ogr_formats.html"/> |
28 <param type="select" name="f" label="Conversion format" value="" help="Select the format to convert your input file. Currently supported : Shapefile, GeoJSON, GML, KML and WFS."> | 40 <param type="select" name="f" label="Conversion format" value="" help="Select the format to convert your input file. Currently supported : Shapefile, GeoJSON, GML, KML and WFS."> |
29 <option value="ESRI Shapefile">ESRI Shapefile</option> | 41 <option value="ESRI Shapefile">ESRI Shapefile</option> |
30 <option value="GeoJSON">GEOJSON</option> | 42 <option value="GeoJSON">GEOJSON</option> |
31 <option value="GML">GML</option> | 43 <option value="GML">GML</option> |
32 <option value="KML">KML</option> | 44 <option value="KML">KML</option> |
33 <option value="WFS">WFS</option> | 45 <option value="WFS">WFS</option> |
34 </param> | 46 </param> |
47 <conditional name="settings"> | |
48 <expand macro="gdal_advanced_params_select"/> | |
49 <when value="advanced"> | |
50 <expand macro="gdal_param_oo"/> | |
51 </when> | |
52 </conditional> | |
35 </inputs> | 53 </inputs> |
36 <outputs> | 54 <outputs> |
37 <data name="output" from_work_dir="output" format="xml" label="${on_string}.${f}"> | 55 <data name="output" from_work_dir="output" format="xml" label="${on_string}.${f}"> |
38 <filter>f != 'ESRI Shapefile'</filter> | 56 <filter>f != 'ESRI Shapefile'</filter> |
39 <change_format> | 57 <change_format> |
55 <composite_data value="shp_compositefiles/shapefile.dbf"/> | 73 <composite_data value="shp_compositefiles/shapefile.dbf"/> |
56 <composite_data value="shp_compositefiles/shapefile.sbn"/> | 74 <composite_data value="shp_compositefiles/shapefile.sbn"/> |
57 <composite_data value="shp_compositefiles/shapefile.sbx"/> | 75 <composite_data value="shp_compositefiles/shapefile.sbx"/> |
58 </param> | 76 </param> |
59 <param name="f" value="KML"/> | 77 <param name="f" value="KML"/> |
78 <param name="advanced" value="simple"/> | |
60 <output file="ogr2ogr_KML.kml" name="output"/> | 79 <output file="ogr2ogr_KML.kml" name="output"/> |
61 </test> | 80 </test> |
62 <test> | 81 <test> |
63 <param name="input" value="shp_compositefiles/shapefile.xml" ftype="shp"> | 82 <param name="input" value="shp_compositefiles/shapefile.xml" ftype="shp"> |
64 <composite_data value="shp_compositefiles/shapefile.shp"/> | 83 <composite_data value="shp_compositefiles/shapefile.shp"/> |
66 <composite_data value="shp_compositefiles/shapefile.dbf"/> | 85 <composite_data value="shp_compositefiles/shapefile.dbf"/> |
67 <composite_data value="shp_compositefiles/shapefile.sbn"/> | 86 <composite_data value="shp_compositefiles/shapefile.sbn"/> |
68 <composite_data value="shp_compositefiles/shapefile.sbx"/> | 87 <composite_data value="shp_compositefiles/shapefile.sbx"/> |
69 </param> | 88 </param> |
70 <param name="f" value="GML"/> | 89 <param name="f" value="GML"/> |
90 <param name="advanced" value="simple"/> | |
71 <output file="ogr2ogr_GML.gml" name="output"/> | 91 <output file="ogr2ogr_GML.gml" name="output"/> |
72 </test> | 92 </test> |
73 <test> | 93 <test> |
74 <param name="input" value="shp_compositefiles/shapefile.xml" ftype="shp"> | 94 <param name="input" value="shp_compositefiles/shapefile.xml" ftype="shp"> |
75 <composite_data value="shp_compositefiles/shapefile.shp"/> | 95 <composite_data value="shp_compositefiles/shapefile.shp"/> |
77 <composite_data value="shp_compositefiles/shapefile.dbf"/> | 97 <composite_data value="shp_compositefiles/shapefile.dbf"/> |
78 <composite_data value="shp_compositefiles/shapefile.sbn"/> | 98 <composite_data value="shp_compositefiles/shapefile.sbn"/> |
79 <composite_data value="shp_compositefiles/shapefile.sbx"/> | 99 <composite_data value="shp_compositefiles/shapefile.sbx"/> |
80 </param> | 100 </param> |
81 <param name="f" value="GeoJSON"/> | 101 <param name="f" value="GeoJSON"/> |
102 <param name="advanced" value="simple"/> | |
82 <output file="ogr2ogr_geojson.json" name="output"/> | 103 <output file="ogr2ogr_geojson.json" name="output"/> |
83 </test> | 104 </test> |
84 <test> | 105 <test> |
85 <param name="input" value="ogr2ogr_KML.kml" ftype="xml"/> | 106 <param name="input" value="ogr2ogr_KML.kml" ftype="xml"/> |
86 <param name="f" value="GeoJSON"/> | 107 <param name="f" value="GeoJSON"/> |
108 <param name="advanced" value="simple"/> | |
87 <output file="ogr2ogr_test2_geojson.json" name="output"/> | 109 <output file="ogr2ogr_test2_geojson.json" name="output"/> |
88 </test> | 110 </test> |
89 <test> | 111 <test> |
90 <param name="input" value="ogr2ogr_KML.kml" ftype="xml"/> | 112 <param name="input" value="ogr2ogr_KML.kml" ftype="xml"/> |
91 <param name="f" value="ESRI Shapefile"/> | 113 <param name="f" value="ESRI Shapefile"/> |
114 <param name="advanced" value="simple"/> | |
92 <output file="shp_compositefiles/ogr2ogr_shapefile2.html" name="shapefile"> | 115 <output file="shp_compositefiles/ogr2ogr_shapefile2.html" name="shapefile"> |
93 <extra_files type="file" name="shapefile.dbf" value="shp_compositefiles/ogr2ogr_shapefile2.dbf" compare="sim_size" delta="50"/> | 116 <extra_files type="file" name="shapefile.dbf" value="shp_compositefiles/ogr2ogr_shapefile2.dbf" compare="sim_size" delta="50"/> |
94 <extra_files type="file" name="shapefile.prj" value="shp_compositefiles/ogr2ogr_shapefile2.prj"/> | 117 <extra_files type="file" name="shapefile.prj" value="shp_compositefiles/ogr2ogr_shapefile2.prj"/> |
95 <extra_files type="file" name="shapefile.shp" value="shp_compositefiles/ogr2ogr_shapefile2.shp"/> | 118 <extra_files type="file" name="shapefile.shp" value="shp_compositefiles/ogr2ogr_shapefile2.shp"/> |
96 <extra_files type="file" name="shapefile.shx" value="shp_compositefiles/ogr2ogr_shapefile2.shx"/> | 119 <extra_files type="file" name="shapefile.shx" value="shp_compositefiles/ogr2ogr_shapefile2.shx"/> |
97 </output> | 120 </output> |
98 </test> | 121 </test> |
99 <test> | 122 <test> |
100 <param name="input" value="ogr2ogr_KML.kml" ftype="xml"/> | 123 <param name="input" value="ogr2ogr_KML.kml" ftype="xml"/> |
101 <param name="f" value="GML"/> | 124 <param name="f" value="GML"/> |
125 <param name="advanced" value="simple"/> | |
102 <output file="ogr2ogr_GML2.gml" name="output"/> | 126 <output file="ogr2ogr_GML2.gml" name="output"/> |
103 </test> | 127 </test> |
104 </tests> | 128 <test> |
129 <param name="input" value="ogr2ogr_fromgbif.tabular" ftype="tabular"/> | |
130 <param name="f" value="GeoJSON"/> | |
131 <param name="advanced" value="advanced"/> | |
132 <param name="oo" value="X_POSSIBLE_NAMES=longitude"/> | |
133 <param name="oo" value="Y_POSSIBLE_NAMES=latitude"/> | |
134 <output file="ogr2ogr_gbif_to_json.json" name="output" lines_diff="2"/> | |
135 </test> | |
136 </tests> | |
105 <help><![CDATA[ | 137 <help><![CDATA[ |
106 ======== | 138 ======== |
107 Ogrinfo | 139 Ogrinfo |
108 ======== | 140 ======== |
109 | 141 |