annotate table2geojson.xml @ 2:402faa5eab62 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
author iuc
date Tue, 18 Nov 2025 22:46:21 +0000
parents fb5081261c10
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
1 <tool id="geopandas_table2geojson" name="Table to GeoJSON" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
2 <description></description>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
3 <macros>
1
fb5081261c10 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit d884ec05f204bf49251c3c1238fe192394fe5d90
iuc
parents: 0
diff changeset
4 <token name="@TOOL_VERSION@">1.1.1</token>
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
5 <token name="@VERSION_SUFFIX@">1</token>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
6 <token name="@PROFILE@">24.2</token>
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
7 </macros>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
8 <requirements>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
9 <requirement type="package" version="@TOOL_VERSION@">geopandas</requirement>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
10 </requirements>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
11 <command detect_errors="exit_code"><![CDATA[
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
12 python '$csv2geojson'
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
13 ]]></command>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
14 <configfiles>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
15 <configfile name="csv2geojson">
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
16 import json
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
17 import pandas as pd
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
18 import geopandas as gpd
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
19
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
20 df = pd.read_csv('$infile', encoding="utf-8", sep=None, engine='python', header=None if '$has_header' == "false" else 0)
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
21
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
22 inc = [int(x)-1 for x in str('$include_columns').split(",") if x.strip().isdigit()] if '$include_columns' and str('$include_columns').lower() != "none" else []
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
23 exc = [int(x)-1 for x in str('$exclude_columns').split(",") if x.strip().isdigit()] if '$exclude_columns' and str('$exclude_columns').lower() != "none" else []
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
24
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
25 property_df = df
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
26
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
27 if inc:
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
28 property_df = df.iloc[:, inc]
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
29 if exc:
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
30 property_df = property_df.drop(columns=df.columns[exc])
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
31
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
32 gdf = gpd.GeoDataFrame(
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
33 property_df,
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
34 geometry=gpd.points_from_xy(
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
35 df.iloc[:, int($lat_column)-1],
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
36 df.iloc[:, int($long_column)-1]),
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
37 crs="$crs"
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
38 )
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
39
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
40 # drop_id: bool, default: False
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
41 data = json.loads(gdf.to_json())
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
42 with open('outfile.geojson', "w", encoding="utf8") as f:
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
43 ## Minify output json
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
44 f.write(json.dumps(data, indent=4))
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
45 </configfile>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
46 </configfiles>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
47 <inputs>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
48 <param name="infile" type="data" format="csv,tabular,tsv" label="The file you want to convert"/>
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
49 <param name="has_header" type="boolean" truevalue="true" falsevalue="false" label="First row contains column names (header)?" help="Does your input file consists of a header"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
50 <param name="lat_column" type="integer" value="1" label="Latitude column"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
51 <param name="long_column" type="integer" value="2" label="Longitude column"/>
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
52 <param name="include_columns" type="data_column" data_ref="infile" use_header_names="true" multiple="true" optional="true"
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
53 label="Include the following columns" help="Either include or exclude columns, by default, all columns will be taken over into the properties field"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
54 <param name="exclude_columns" type="data_column" data_ref="infile" use_header_names="true" multiple="true" optional="true"
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
55 label="Exclude the following columns" help="Either include or exclude columns, by default, all columns will be taken over into the properties field"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
56 <param name="crs" type="select" label="Coordinate Reference System" help="Choose the Coordinate Reference Systems (CRS) your data is using">
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
57 <option value="EPSG:3857">Web Mercator projection</option>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
58 <option value="EPSG:4326" selected="true">WGS84 projection (used by Google Earth)</option>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
59 </param>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
60
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
61 </inputs>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
62 <outputs>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
63 <data name="outfile" format="geojson" from_work_dir="outfile.geojson" label="${tool.name} on ${on_string}" />
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
64 </outputs>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
65 <tests>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
66 <test expect_num_outputs="1">
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
67 <param name="infile" value="geolocation.csv"/>
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
68 <param name="has_header" value="true"/>
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
69 <param name="lat_column" value="1"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
70 <param name="long_column" value="2"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
71 <param name="crs" value="EPSG:3857"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
72 <output name="outfile" file="geolocation_1.geojson">
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
73 <assert_contents>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
74 <has_json_property_with_text property="type" text="FeatureCollection"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
75 <!-- all 5 columns are includes as properties, nothing excluded, nothing explicitly included -->
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
76 <has_text text='value": 10'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
77 <has_text text='temperature": 23'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
78 <has_text text='longitude'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
79 <has_text text='latitude'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
80 <has_text text='timestamp": "2023-01-01T12:05:00Z"'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
81 <has_n_lines n="371"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
82 </assert_contents>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
83 </output>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
84 </test>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
85 <test expect_num_outputs="1">
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
86 <param name="infile" value="geolocation_without_header.csv"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
87 <param name="has_header" value="false"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
88 <param name="lat_column" value="1"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
89 <param name="long_column" value="2"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
90 <param name="crs" value="EPSG:3857"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
91 <output name="outfile">
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
92 <assert_contents>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
93 <has_json_property_with_text property="type" text="FeatureCollection"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
94 <has_n_lines n="371"/>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
95 </assert_contents>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
96 </output>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
97 </test>
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
98 <test expect_num_outputs="1">
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
99 <param name="infile" value="geolocation.csv"/>
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
100 <param name="has_header" value="true"/>
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
101 <param name="lat_column" value="1"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
102 <param name="long_column" value="2"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
103 <param name="include_columns" value="3,4"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
104 <param name="crs" value="EPSG:3857"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
105 <output name="outfile" ftype="geojson" file="geolocation_2.geojson">
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
106 <assert_contents>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
107 <!-- 2 columns are explicitly included as properties -->
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
108 <has_text text='timestamp": "2023-01-01T12:05:00Z"'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
109 <has_text text='value": 10'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
110 <has_text text="FeatureCollection"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
111 <has_n_lines n="311"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
112 </assert_contents>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
113 </output>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
114 </test>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
115 <test expect_num_outputs="1">
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
116 <param name="infile" value="geolocation.csv"/>
2
402faa5eab62 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 28236fa503017adc781fc8e7bee547eeb44182f2
iuc
parents: 1
diff changeset
117 <param name="has_header" value="true"/>
0
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
118 <param name="lat_column" value="1"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
119 <param name="long_column" value="2"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
120 <param name="exclude_columns" value="5"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
121 <param name="crs" value="EPSG:3857"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
122 <output name="outfile" ftype="geojson" file="geolocation_3.geojson">
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
123 <assert_contents>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
124 <has_json_property_with_text property="type" text="FeatureCollection"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
125 <!-- 4 columns are includes as properties ... one is excluded -->
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
126 <has_text text='value": 10'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
127 <has_text text='longitude'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
128 <has_text text='latitude'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
129 <has_text text='timestamp": "2023-01-01T12:05:00Z"'/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
130 <has_n_lines n="351"/>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
131 </assert_contents>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
132 </output>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
133 </test>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
134
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
135 </tests>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
136 <help format="markdown"><![CDATA[
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
137
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
138 # 💡 Convert CSV or Tabular Data to GeoJSON Format
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
139
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
140 ## Understanding Coordinate Reference Systems (CRS)
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
141
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
142 A Coordinate Reference System (CRS) defines how the coordinate values in your data relate to real-world locations on Earth. Without a CRS,
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
143 the coordinates in a GeoSeries or GeoDataFrame are simply numbers in an undefined space.
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
144 To find reference codes for widely used CRS projections, visit [spatialreference.org](https://spatialreference.org).
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
145
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
146 ## What is GeoJSON?
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
147
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
148 GeoJSON is a widely-used format for encoding geographic data structures using JSON (JavaScript Object Notation).
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
149 A GeoJSON file contains an array of geographic features, where each feature includes:
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
150 * A geometry field describing the spatial shape (e.g., point, line, polygon),
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
151 * A properties field containing non-spatial attributes.
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
152
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
153 GeoJSON uses the WGS84 coordinate system by default (EPSG:4326), with coordinates expressed in decimal degrees.
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
154 To explore and edit GeoJSON interactively, visit [geojson.io](https://geojson.io), select a location or shape, and inspect the resulting GeoJSON output.
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
155
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
156 📌 Pro Tip, Galaxy can visualise GeoJSON files.
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
157
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
158 ]]></help>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
159 <citations>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
160 <citation type="doi">10.5281/zenodo.3946761</citation>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
161 </citations>
7bc130112fa3 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/geopandas commit 76226199cd9ac3de12c81cc36b38c86bf4d676f5
iuc
parents:
diff changeset
162 </tool>