Closed cbrewitt closed 4 years ago
findNearest
works only in the 2D space. If you use a BasicPoint2d
for your query, it should work fine.
Thank you, BasicPoint2d has worked.
Hi there,
I've been using the findNearest function as well with the same intent that @cbrewitt had mentioned above. I was confused about the "count" parameter and how exactly it worked. The description in the code, which I've copied below, was difficult for me to understand. If you could provide a more detailed explanation on what the "count" parameter specifies, I would greatly appreciate it.
// Idea: nearestUntil passes us elements with increasing bounding box // distance. // If this distance is greater than the actual distance (between primitives) // of the count-th furthest current element, then we can stop, because all // succeding elements will be even further away.
When I run findNearest with count=1 for a predefined Point2d that lies in my .osm map, sometimes I get 6 or more lanelets from findNearest. These lanelets are adjacent, but it is not the case that they all share an overlapping region in which my point lies. Is there any way to only get the lanelets that the point lies in? Thank you in advance for your help.
I am attempting to use
lanelet2.geometry.findNearest
to find the lanelet which a point is in. I've contructed a simple script which reproduces the issue based on the reply in this issue, and the python API tutorial:When running this script, I get the following error:
Based on the example in the other issue, I would have assumed that a
BasicPoint3d
would be valid for the second argument but the error seems to suggest not.