I am curious to know on how to implement NNJoin into the python code. I have created a point shapefile using shapely. I have another shapefile which is a centerline and is used as a reference line. Now I want to find the shortest distance from each point to the centerline. The way which I have done so far is converted the centerline shapefile into points and used NNJoin to find the shortest distance and the nearest coordinates of the point on the centerline. I want to know as to how I can implement the NNJoin using python.
Is there a way to import NNJoin as a library and use it?
If not are there any alternatives to it which I can use?