I receive large parquet file (approx. 10 million rows) that lists incidents and their coordinates (latitude and longitude) but no additional information on a weekly basis. At some stage in the flow, I need to do a spatial join to merge attributes from 2 shapefiles that contain polygons that define specific regional and adminsistrative information to the incident points.
I can take the data out of the KNIME to do the spatial join in QGIS or ESRI ArcGIS and then bring it back to finish the workfow, but this a flow that I would like to schedule and run autonomously.
I have tried a number of strategies to merge the data but have not been successful. If anyone has done a spatial join, or has some ideas of how it could be done, I would really appreciate any pointers.
Looks like you want to find which polygon a point is inside off. I remember a similar question being asked recently. Maybe those two links help you out: Point in polygon - Wikipedia
In this thread there’s an implementation for the ray casting algorithm in R. It should be easy to adapt it for Java Snippets.
It should also not be too difficult to either loop over all polygons with a recursive loop or expand the algorithm to return the surrounding polygon within a single node.
This is what I am looking for. I will look at migrating it to a Java snippet, but because I do so much geospatial stuff at the moment, I will probably take some time out and look at using a java geospatial library that has wide functionality and build a set of nodes I can reuse.