help requested on Geocoding

Hi all,

I need some help with a Geocoding issue. I have a file that defines a Polygon which I would like to use in KNIME, more precisely to draw the polygon on a map and check if some coordinates are inside the polygon.

The file was created with this tool:

At the bottom of this post I pasted the contents of this file, which I saved as ExamplePoly.txt.

Can anybody help me on how to do this ? which node(s) to use etc…
Many thanks already …

ExamplePoly.txt file :
-5.6250000, 36.1378747
-4.6142578, 36.6684189
-2.8564453, 36.7036596
-1.2304688, 37.0200982
0.3515625, 38.2381801
1.0107422, 40.2459915
3.1201172, 41.2117215
3.5595703, 42.0656068
0.8789063, 40.8802948
-0.4394531, 39.7747695
-0.1757813, 38.4105583
-1.7578125, 37.3701572
-4.1748047, 36.8092847
-5.6250000, 36.1378747
{
“coordinates”: [
[
[
-5.625,
36.1378747
],
[
-4.6142578,
36.6684189
],
[
-2.8564453,
36.7036596
],
[
-1.2304688,
37.0200982
],
[
0.3515625,
38.2381801
],
[
1.0107422,
40.2459915
],
[
3.1201172,
41.2117215
],
[
3.5595703,
42.0656068
],
[
0.8789063,
40.8802948
],
[
-0.4394531,
39.7747695
],
[
-0.1757813,
38.4105583
],
[
-1.7578125,
37.3701572
],
[
-4.1748047,
36.8092847
],
[
-5.625,
36.1378747
]
]
],
“type”: “Polygon”
}

Hi Marc,

please check the @rfeigel s solution of the Just-KNIME-it Season 3 - 17 task.

There you can see that you just need to convert the coordinates to a geometry column, then if you like add some points and the line.

3 Likes

Vielen Dank Andreas,

I will try it out Sunday or next week…

1 Like

Hi @Marc_Goossens

With the suggestion of @ActionAndi you are almost half way. But the last step Line to Polygon throws an error (Execute failed: ‘_ExecutionContext’ object has no attribute ‘logger’ ) , because around Malaga (Spain) the line crossed itself .

So I changed the the longitude coordinates from the second point. And then it works

See this wf: geocoding_points_to_polygon.knwf (64.8 KB)

Gr. Hans

3 Likes

Thanks very much Hans

1 Like