I am trying to create a script that identifies the closest point on a line to point. I did a lot of research and landed on the shapely module to complete this.
I use the example code
from shapely.geometry import Point, LineString
from shapely.ops import nearest_points
line = LineString([(0, 0), (1, 1), (2, 2)])
point = Point(0.3, 0.7)
np = nearest_points(line, point)[0]
I want to print np to get my answer and all I get get in my kernel is a picture of a dot. Can someone tell me what I am missing to print out the coordinate. The examples I see print the coordinates.
I am using anaconda with spyder. I do have to use anaconda due to the base program at work I have to use.