3131)
3232@knext .output_table (
3333 name = "Geodata table" ,
34- description = "Geodata from the input file path ." ,
34+ description = "Geodata from the input file." ,
3535)
3636@knut .geo_node_description (
3737 short_description = "Read single layer GeoFile." ,
38- description = """This node reads a single geofile from the path to the file or URL with geopandas.read_file().
39- The support file formats contain the popular data type such as ESRI Shapefile (.shp), zipped Shapefiles(.zip),single-layer GeoPackage file, or GeoJSON.
40- The standard Lcoal File path in KNIME Explorer,e.g.,'E:\KNIMEworkspace\t est.geojson', can work as a file path without quotaion marks.
38+ description = """This node reads a single geospatial file from the path to the file or URL.
39+ The supported file formats are the popular data types such as ESRI Shapefile (.shp), zipped Shapefiles(.zip),
40+ single-layer GeoPackage file, or GeoJSON.
41+ Example of a standard local file path would be *C:/KNIMEworkspace/test.geojson*.
4142 """ ,
4243 references = {
4344 "Reading Spatial Data" : "https://geopandas.org/en/stable/docs/user_guide/io.html" ,
45+ "Read file" : "https://geopandas.org/en/stable/docs/reference/api/geopandas.read_file.html" ,
4446 },
4547)
4648class GeoFileReaderNode :
4749 data_url = knext .StringParameter (
48- "Input File Path " ,
50+ "Input file path " ,
4951 "The file path for reading data." ,
5052 "" ,
5153 )
@@ -78,9 +80,11 @@ def execute(self, exec_context: knext.ExecutionContext):
7880)
7981@knut .geo_node_description (
8082 short_description = "Write single layer GeoFile." ,
81- description = "This node writes the data in the format of Shapefile or GeoJSON with geopandas.to_file()." ,
83+ description = """This node writes the data in the format of Shapefile or GeoJSON.
84+ Example of a standard local file path would be *C:/KNIMEworkspace/test.geojson*.""" ,
8285 references = {
8386 "Writing Spatial Data" : "https://geopandas.org/en/stable/docs/user_guide/io.html" ,
87+ "To file" : "https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.to_file.html" ,
8488 },
8589)
8690class GeoFileWriterNode :
@@ -94,13 +98,13 @@ class GeoFileWriterNode:
9498 )
9599
96100 data_url = knext .StringParameter (
97- "Output file path and file name " ,
101+ "Output file path" ,
98102 "The file path for writing data without the file format or extension." ,
99103 "" ,
100104 )
101105
102106 dataformat = knext .StringParameter (
103- "Output File Format " ,
107+ "Output file format " ,
104108 "The file path to save the data in the format of .shp or .geojson." ,
105109 "Shapefile" ,
106110 enum = ["Shapefile" , "GeoJSON" ],
@@ -141,18 +145,19 @@ def execute(self, exec_context: knext.ExecutionContext, input_1):
141145)
142146@knut .geo_node_description (
143147 short_description = "Read GeoPackage layer" ,
144- description = """This node reads the GeoPackage, GeoDatabase(GDB) data with geopandas.read_file() .
148+ description = """This node reads the GeoPackage, GeoDatabase(GDB) data.
145149 Using this node needs to specify the layer name, if set empty or wrong, the node will read the first layer.
146150 The number as a layer order can also be applied, such as 0, 1, or other integer numbers .
147151 The node will export the names of all layers as a table, which can be utilized to revise the name of target layer.
148152 """ ,
149153 references = {
150154 "Reading Spatial Data" : "https://geopandas.org/en/stable/docs/user_guide/io.html" ,
155+ "Read file" : "https://geopandas.org/en/stable/docs/reference/api/geopandas.read_file.html" ,
151156 },
152157)
153158class GeoPackageReaderNode :
154159 data_url = knext .StringParameter (
155- "Input File Path " ,
160+ "Input file path " ,
156161 "The file path for reading data." ,
157162 "" ,
158163 )
@@ -168,21 +173,20 @@ def configure(self, configure_context):
168173 return None
169174
170175 def execute (self , exec_context : knext .ExecutionContext ):
171- layerlist = fiona .listlayers (self .data_url )
172- pnumber = pd .Series (range (0 ,100 )).astype (str ).to_list ()
173- if self .data_layer in layerlist :
176+ layerlist = fiona .listlayers (self .data_url )
177+ pnumber = pd .Series (range (0 , 100 )).astype (str ).to_list ()
178+ if self .data_layer in layerlist :
174179 gdf = gp .read_file (self .data_url , layer = self .data_layer )
175- elif self .data_layer in pnumber :
176- nlayer = int (self .data_layer )
177- gdf = gp .read_file (self .data_url ,layer = nlayer )
180+ elif self .data_layer in pnumber :
181+ nlayer = int (self .data_layer )
182+ gdf = gp .read_file (self .data_url , layer = nlayer )
178183 else :
179- gdf = gp .read_file (self .data_url ,layer = 0 )
184+ gdf = gp .read_file (self .data_url , layer = 0 )
180185 gdf = gdf .reset_index (drop = True )
181- listtable = pd .DataFrame ({' layerlist' : layerlist })
186+ listtable = pd .DataFrame ({" layerlist" : layerlist })
182187 return knext .Table .from_pandas (gdf ), knext .Table .from_pandas (listtable )
183188
184189
185-
186190############################################
187191# GeoPackage Writer
188192############################################
@@ -199,11 +203,12 @@ def execute(self, exec_context: knext.ExecutionContext):
199203)
200204@knut .geo_node_description (
201205 short_description = "Write GeoPackage layer." ,
202- description = """This node writes the data as a layer into a GeoPackage data with geopandas.to_file() .
203- If the layer is already in the GeoPackage data, the orginal data of the target layer will be written by the new data.
206+ description = """This node writes the data as a layer into a GeoPackage data.
207+ If the layer is already in the GeoPackage data, the original data of the target layer will be written by the new data.
204208 """ ,
205209 references = {
206210 "Writing Spatial Data" : "https://geopandas.org/en/stable/docs/user_guide/io.html" ,
211+ "To file" : "https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.to_file.html" ,
207212 },
208213)
209214class GeoPackageWriterNode :
@@ -217,7 +222,9 @@ class GeoPackageWriterNode:
217222 )
218223
219224 data_url = knext .StringParameter (
220- "Input File Path" , "The file path for saving data." , "" ,
225+ "Input file path" ,
226+ "The file path for saving data." ,
227+ "" ,
221228 )
222229
223230 data_layer = knext .StringParameter (
0 commit comments