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

Changeset 2:5b2417aa0b62 (2019-06-13)
Previous changeset 1:7bdf6ee695a8 (2019-02-28) Next changeset 3:24696f52a90a (2019-06-20)
Commit message:
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/gdal commit d2c064afb4680f459012473e4de8653079e32c15
modified:
gdal_macros.xml
ogrinfo.xml
added:
test-data/ogrinfo_shp.txt
test-data/shp_compositefiles/shapefile.dbf
test-data/shp_compositefiles/shapefile.html
test-data/shp_compositefiles/shapefile.sbn
test-data/shp_compositefiles/shapefile.sbx
test-data/shp_compositefiles/shapefile.shp
test-data/shp_compositefiles/shapefile.shx
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 gdal_macros.xml
--- a/gdal_macros.xml Thu Feb 28 04:43:13 2019 -0500
+++ b/gdal_macros.xml Thu Jun 13 11:29:15 2019 -0400
b
@@ -1,5 +1,5 @@
 <macros>
-    <token name="@VERSION@">2.4.0</token>  
+    <token name="@VERSION@">3.0.0</token>  
     <xml name="gdal_requirements">
         <requirements>
             <requirement type="package" version="@VERSION@">gdal</requirement>
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 ogrinfo.xml
--- a/ogrinfo.xml Thu Feb 28 04:43:13 2019 -0500
+++ b/ogrinfo.xml Thu Jun 13 11:29:15 2019 -0400
[
@@ -5,19 +5,25 @@
     </macros>
     <expand macro="gdal_requirements" />
     <command detect_errors="exit_code"><![CDATA[
-        ogrinfo -ro '$input1'  -al 
-            #if $settings.advanced=='advanced'
-                #if $settings.condi_sql.sql=='sql':
-                    #if str($settings.condi_sql.sql_statement).strip()!='':
-                        -sql '$settings.condi_sql.sql_statement'
-                    #end if
+    ogrinfo -ro
+        #if $input1.is_of_type("shp") 
+            ${os.path.join( $input1.extra_files_path, 'shapefile.shp' )} 
+        #else
+            '$input1' 
+        #end if
+        -al
+        #if $settings.advanced=='advanced'
+            #if $settings.condi_sql.sql=='sql':
+                #if str($settings.condi_sql.sql_statement).strip()!='':
+                    -sql '$settings.condi_sql.sql_statement'
                 #end if
-                $settings.so
             #end if
+            $settings.so
+        #end if
         > '$output'
     ]]></command>
     <inputs>
-        <param type="data" name="input1" format="xml,txt,netcdf" label="Gdal supported vector input file" help="Currently supported format are GeoJSON GML KML and WFS"/>
+        <param type="data" name="input1" format="xml,txt,netcdf,shp" label="Gdal supported vector input file" help="Currently supported format are GeoJSON GML KML, WFS and Shapefile"/>
         <conditional name="settings">
             <expand macro="gdal_advanced_params_select"/>
             <when value="advanced">
@@ -46,20 +52,20 @@
         <test>
             <param name="input1" value="custom.geo.json"/>
             <param name="advanced" value="simple"/>
-            <output name="output" file="ogrinfo_test1_out2.txt" lines_diff="82"/>
+            <output name="output" file="ogrinfo_test1_out2.txt" lines_diff="85"/>
         </test>
-<!--
-     #Layername OGRGeoJSON is basicaly input filename, so in Galaxy it become "dataset_X". I couldn't create a test using the sql option, "X" will change every time we add or remove a testfile.
-     <test>
-            <param name="input1" value="custom.geo.json"/>
-            <param name="advanced" value="advanced"/>
-            <param name="sql" value="sql"/>
-            <param name="sql_statement" value="SELECT * FROM OGRGeoJSON"/> 
-            <param name="so" value="-so"/>
-            <output name="output" file="ogrinfo_test2_out2.txt" lines_diff="4"/>
+        <test>
+            <param name="input1" value="shp_compositefiles/shapefile.html" ftype="shp">
+                <composite_data value="shp_compositefiles/shapefile.shp"/>
+                <composite_data value="shp_compositefiles/shapefile.shx"/>
+                <composite_data value="shp_compositefiles/shapefile.dbf"/>
+                <composite_data value="shp_compositefiles/shapefile.sbn"/>
+                <composite_data value="shp_compositefiles/shapefile.sbx"/>
+            </param>
+            <param name="advanced" value="simple"/>
+            <output name="output" file="ogrinfo_shp.txt" lines_diff="2"/>
         </test>
--->
-   </tests>
+    </tests>
     <help><![CDATA[
 ========
 Ogrinfo
@@ -83,7 +89,7 @@
 
 http://www.gdal.org
 
-http://www.gdal.org/ogr_utilities.html
+https://gdal.org/programs/ogrinfo.html
 
 http://download.osgeo.org/gdal/workshop/foss4ge2015/workshop_gdal.pdf
     ]]></help>
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 test-data/ogrinfo_shp.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ogrinfo_shp.txt Thu Jun 13 11:29:15 2019 -0400
b
b"@@ -0,0 +1,163 @@\n+INFO: Open of `/tmp/tmp5x4JIA/files/000/dataset_1_files/shapefile.shp'\n+      using driver `ESRI Shapefile' successful.\n+\n+Layer name: shapefile\n+Metadata:\n+  DBF_DATE_LAST_UPDATE=1996-04-30\n+Geometry: Line String\n+Feature Count: 30\n+Extent: (-115.041496, 15.439924) - (-90.658142, 32.720833)\n+Layer SRS WKT:\n+(unknown)\n+NAME: String (40.0)\n+SYSTEM: String (40.0)\n+OGRFeature(shapefile):0\n+  NAME (String) = Amajac\n+  SYSTEM (String) = (null)\n+  LINESTRING (-98.7458343505859 21.275203704834,-98.7814025878906 21.1805534362793,-98.9561157226562 21.0749969482422,-98.9625091552734 21.0119438171387,-99.0036163330078 21.0180549621582,-99.0561218261719 20.9449996948242,-99.0222320556641 20.8469429016113,-98.9613952636719 20.8163871765137,-98.8886260986328 20.5819435119629,-98.8352813720703 20.5222206115723,-98.8114013671875 20.3349990844727,-98.7308349609375 20.3258323669434,-98.6977844238281 20.2838859558105)\n+\n+OGRFeature(shapefile):1\n+  NAME (String) = Balsas\n+  SYSTEM (String) = Balsas\n+  MULTILINESTRING ((-102.915557861328 19.9305534362793,-102.807342529297 19.8991508483887,-102.891403198242 19.8308296203613,-102.829452514648 19.7719421386719,-102.780288696289 19.4730529785156,-102.745010375977 19.4249992370605,-102.781402587891 19.3777770996094,-102.778625488281 19.2988624572754,-102.812225341797 19.3569412231445,-103.067230224609 19.4474983215332,-103.064727783203 19.556941986084),(-102.778625488281 19.2988624572754,-102.771392822266 19.1747207641602,-102.637222290039 19.0530548095703,-102.487228393555 19.0136108398438,-102.317779541016 18.8994407653809,-102.131958007812 18.8538856506348,-102.072509765625 18.8486099243164,-102.080291748047 18.892219543457,-102.052230834961 18.913330078125,-102.024726867676 18.8186073303223,-102.001106262207 18.9013862609863,-101.973068237305 18.8866653442383,-101.950286865234 18.9124984741211,-102.000839233398 18.7980537414551,-101.966667175293 18.7616653442383,-101.935012817383 18.7941665649414,-101.933616638184 18.7580528259277,-101.870292663574 18.752498626709,-101.892501831055 18.7308311462402,-101.871116638184 18.692497253418,-101.809448242188 18.7422218322754,-101.852783203125 18.6283302307129,-101.70556640625 18.6705551147461,-101.683059692383 18.6183319091797,-101.651123046875 18.6174964904785,-101.621948242188 18.6763877868652,-101.60334777832 18.594165802002,-101.561683654785 18.5991630554199,-101.559173583984 18.5347213745117,-101.513343811035 18.498607635498,-101.295562744141 18.5336074829102),(-102.131958007812 18.8538856506348,-102.016403198242 18.7838859558105,-102.000289916992 18.7316665649414,-101.926391601562 18.715274810791,-101.9375 18.6799964904785,-101.876106262207 18.6752777099609,-101.911392211914 18.6499977111816,-101.877227783203 18.6199989318848,-101.918060302734 18.5144424438477,-101.888343811035 18.494441986084,-101.888633728027 18.439998626709,-101.994743347168 18.4752769470215,-101.896118164062 18.4077758789062,-101.870292663574 18.3172187805176,-101.900283813477 18.2613868713379),(-101.295562744141 18.5336074829102,-101.347229003906 18.4622192382812,-101.436111450195 18.4661102294922,-101.427230834961 18.4272193908691,-101.587783813477 18.5158309936523,-101.634170532227 18.5922203063965,-101.725852966309 18.5322189331055,-101.769180297852 18.5769424438477,-101.847778320312 18.5477752685547,-101.870010375977 18.4916648864746,-101.851119995117 18.2958297729492,-101.787231445312 18.2894439697266,-101.836402893066 18.2391662597656,-101.900283813477 18.2613868713379),(-101.295562744141 18.5336074829102,-101.087509155273 18.5011100769043,-101.011123657227 18.517219543457,-100.946670532227 18.4419441223145,-100.909454345703 18.4499969482422,-100.915283203125 18.4774971008301,-100.793060302734 18.4722213745117,-100.732788085938 18.4063873291016,-100.692230224609 18.4152755737305,-100.695556640625 18.3058319091797,-100.628067016602 18.3344421386719,-100.54084777832 18.2024993896484,-100.493347167969 18.1983299255371,-100.496948242188 18.1488876342773,-100"..b'8530540466309,-98.8136138916016 21.942497253418,-98.7583465576172 21.9227752685547,-98.75 21.9883308410645,-98.6275024414062 22.002498626709,-98.5885620117188 21.9752597808838)\n+\n+OGRFeature(shapefile):27\n+  NAME (String) = Tzanconeja\n+  SYSTEM (String) = Usumacinta\n+  LINESTRING (-92.1864013671875 16.9980545043945,-92.0605621337891 16.8852767944336,-91.9852905273438 16.8888854980469,-91.899169921875 16.836109161377,-91.8194580078125 16.8283309936523,-91.8086242675781 16.869441986084,-91.7608337402344 16.8744430541992,-91.6216735839844 16.7797203063965,-91.5761260986328 16.7055549621582,-91.5744476318359 16.5758323669434,-91.5314025878906 16.5238876342773,-91.4183349609375 16.4847221374512,-91.4000091552734 16.4247207641602,-91.3388977050781 16.3847198486328,-91.3408355712891 16.3219413757324,-91.3055572509766 16.3080520629883,-91.2894592285156 16.2424964904785,-91.2008361816406 16.2072219848633,-91.1477966308594 16.1442794799805)\n+\n+OGRFeature(shapefile):28\n+  NAME (String) = Usumacinta\n+  SYSTEM (String) = Usumacinta\n+  MULTILINESTRING ((-92.4808349609375 18.656665802002,-92.4102783203125 18.4930534362793,-92.2755584716797 18.406665802002,-92.2769470214844 18.327220916748,-92.2174530029297 18.224967956543,-92.1844482421875 18.1186103820801,-92.1218719482422 18.0884857177734,-92.1408386230469 18.0022201538086,-92.1163940429688 17.9630546569824,-91.9902114868164 17.9119396209717,-91.9898986816406 17.9122200012207,-91.9505615234375 17.8955497741699,-91.945556640625 17.8547191619873,-91.9125137329102 17.8872203826904,-91.8233337402344 17.88916015625,-91.7866668701172 17.8555507659912,-91.7728729248047 17.7736892700195,-91.7936172485352 17.7266693115234,-91.6986236572266 17.7141609191895,-91.6985702514648 17.7140560150146,-91.6202850341797 17.7383308410645,-91.6575012207031 17.7716636657715,-91.6205596923828 17.7813873291016,-91.6161193847656 17.8266639709473,-91.5691680908203 17.8136100769043,-91.5519561767578 17.7469444274902,-91.5136260986328 17.8024978637695,-91.4794464111328 17.7608299255371,-91.4246978759766 17.7649536132812,-91.4525146484375 17.7008323669434,-91.3761138916016 17.7024993896484,-91.4027862548828 17.6424980163574,-91.3577880859375 17.5913887023926,-91.4064025878906 17.5652770996094,-91.5111236572266 17.5833320617676,-91.4305572509766 17.4883308410645,-91.5044555664062 17.4861106872559,-91.5075607299805 17.4697742462158,-91.4961166381836 17.4041595458984,-91.4263916015625 17.3869400024414,-91.3880615234375 17.32666015625,-91.4375 17.2411079406738,-91.352783203125 17.1763877868652,-91.2772369384766 17.1783332824707,-91.1844482421875 17.0355529785156,-91.1183471679688 17.0102767944336,-91.0627899169922 16.902774810791,-90.98583984375 16.8680534362793,-90.9833374023438 16.9030532836914,-90.9552917480469 16.8991661071777,-90.9661254882812 16.8719444274902,-90.9211120605469 16.829719543457,-90.8033447265625 16.8049964904785,-90.7142791748047 16.7264595031738,-90.6581420898438 16.6442737579346),(-92.1218719482422 18.0884857177734,-92.0816802978516 18.1216659545898,-92.0847320556641 18.2377777099609,-91.901123046875 18.3549995422363,-91.8577880859375 18.4291648864746))\n+\n+OGRFeature(shapefile):29\n+  NAME (String) = Yaqui\n+  SYSTEM (String) = Yaqui\n+  LINESTRING (-109.619186401367 28.9040546417236,-109.636672973633 28.7522201538086,-109.552505493164 28.6002769470215,-109.550567626953 28.5308303833008,-109.521392822266 28.5341644287109,-109.520004272461 28.4683303833008,-109.682510375977 28.1736106872559,-109.798065185547 28.1430549621582,-109.832229614258 28.1683311462402,-109.878890991211 28.1324996948242,-109.789726257324 27.9897193908691,-109.802230834961 27.942497253418,-109.870826721191 27.9058303833008,-109.917793273926 27.958610534668,-109.894508361816 27.8341808319092,-109.922225952148 27.6377754211426,-110.113067626953 27.5424995422363,-110.131393432617 27.571662902832,-110.29833984375 27.594165802002,-110.369445800781 27.6419410705566,-110.463348388672 27.5924987792969,-110.599166870117 27.6577758789062)\n+\n'
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 test-data/shp_compositefiles/shapefile.dbf
b
Binary file test-data/shp_compositefiles/shapefile.dbf has changed
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 test-data/shp_compositefiles/shapefile.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/shp_compositefiles/shapefile.html Thu Jun 13 11:29:15 2019 -0400
b
@@ -0,0 +1,17 @@
+<html><head><title>Shapefile Galaxy Composite Dataset</title></head><p/>
+<div>This composite dataset is composed of the following files:<p/><ul>
+<li><a href="shapefile.shp" type="application/binary">shapefile.shp (Geometry File (shp))</a></li>
+<li><a href="shapefile.shx" type="application/binary">shapefile.shx (Geometry index File (shx))</a></li>
+<li><a href="shapefile.dbf" type="application/binary">shapefile.dbf (Columnar attributes for each shape (dbf))</a></li>
+<li><a href="shapefile.prj" type="application/binary">shapefile.prj (Projection description (prj))</a> (optional)</li>
+<li><a href="shapefile.sbn" type="application/binary">shapefile.sbn (Spatial index of the features (sbn))</a> (optional)</li>
+<li><a href="shapefile.sbx" type="application/binary">shapefile.sbx (Spatial index of the features (sbx))</a> (optional)</li>
+<li><a href="shapefile.fbn" type="application/binary">shapefile.fbn (Read only spatial index of the features (fbn))</a> (optional)</li>
+<li><a href="shapefile.fbx" type="application/binary">shapefile.fbx (Read only spatial index of the features (fbx))</a> (optional)</li>
+<li><a href="shapefile.ain" type="application/binary">shapefile.ain (Attribute index of the active fields in a table (ain))</a> (optional)</li>
+<li><a href="shapefile.aih" type="application/binary">shapefile.aih (Attribute index of the active fields in a table (aih))</a> (optional)</li>
+<li><a href="shapefile.atx" type="application/binary">shapefile.atx (Attribute index for the dbf file (atx))</a> (optional)</li>
+<li><a href="shapefile.ixs" type="application/binary">shapefile.ixs (Geocoding index (ixs))</a> (optional)</li>
+<li><a href="shapefile.mxs" type="application/binary">shapefile.mxs (Geocoding index in ODB format (mxs))</a> (optional)</li>
+<li><a href="shapefile.shp.xml" type="application/binary">shapefile.shp.xml (Geospatial metadata in XML format (xml))</a> (optional)</li>
+</ul></div></html>
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 test-data/shp_compositefiles/shapefile.sbn
b
Binary file test-data/shp_compositefiles/shapefile.sbn has changed
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 test-data/shp_compositefiles/shapefile.sbx
b
Binary file test-data/shp_compositefiles/shapefile.sbx has changed
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 test-data/shp_compositefiles/shapefile.shp
b
Binary file test-data/shp_compositefiles/shapefile.shp has changed
b
diff -r 7bdf6ee695a8 -r 5b2417aa0b62 test-data/shp_compositefiles/shapefile.shx
b
Binary file test-data/shp_compositefiles/shapefile.shx has changed