I am new to KNIME and I want to understand KNIME’s capabilities on processing a latitude/longitude information.
Can Knime return a Geo Fence ID if a lat/long pair is given ? Assuming, geo fences have unique IDs and have polygon information (set of lat/long coordinates to define a geo fence).
What are the helpful Knime nodes in similar requirements ?
Hi,
I think the KNIME Spatial Processing Nodes extension will be quite useful for you. Especially the node Relate Geometries looks like it can help you with geofencing.
Kind regards
Alexander
This is a great help. ReadFromKML, CreatePointFrom2DCoordinates and RelateGeometries did the trick. I now have one limitation which can be explained in below case:
I have latitude and longitude pair. I converted this as a point using EPSG:4326 coordinate reference system,
I have four polygon shapes defined in KML file.
Now I want to know in which polygon my point is located. RelateGeometries did the trick but my point has to be duplicated into 4 records to test against 4 polygon shapes.
What is the smart way to test a point against all 4 polygons and find which is the one polygon that has this point ?
Hi,
I have never worked with the extension but I believe you can do that using a loop, such as the Chunk Loop Start node. Or you use a Cross Joiner to create a table with each combination of your point and the shapes.
Kind regards
Alexander
The previous solution worked. But now I have a larger volume of records. 1,80,000 records have be validated against 230 polygons with RelateGeometries node. This is taking crazy amount of time. Is there a better way to do this ? Chunk Loop and cross join helps to certain extent but considering the volume of data, is there any smart way ?
Hi Sudheer,
unfortunately I don’t know of any good solution. If every record really has to be related to every polygon, I don’t see a way of decreasing the load, you will always need 180,000 x 230 comparisons.
Kind regards,
Alexander