Java – how to find all points in the path in Android?
After a while, I asked a question to see if I could find a specific point on the road; But this time, I wonder if there is a way to know all the points in the path? (I can't find a way to do this, which is unfortunate because Java provides a way, but not Android?)
The reason I ask this is because I have multiple geometries. I want to compare these points and see how they intersect
I appreciate any useful response
Solution
If you create a path, this means that at some point in the code, you will know the exact (GEO) point Why don't you put this point on an ArrayList or something like that?
So, for example, before:
path.lineTo(point.x,point.y);
You can do:
yourList.add(point); path.lineTo(point.x,point.y);
You can then get all the points from the ArrayList Note that you can leverage enhanced for loop syntax. For up to three times ArrayList