Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading documentation for LocationIndexedLine #648

Open
peetw opened this issue Nov 16, 2022 · 2 comments
Open

Misleading documentation for LocationIndexedLine #648

peetw opened this issue Nov 16, 2022 · 2 comments
Labels
upstream-investigate The issue may be present in JTS as well, but we need to investigate to be sure one way or the other.

Comments

@peetw
Copy link
Contributor

peetw commented Nov 16, 2022

The documentation for the LocationIndexedLine.IndexOf method suggests that the LocationIndexedLine.Project method may be more accurate/suitable if the point lies far from the line.

However, the implementation of the two methods is identical:

public LinearLocation IndexOf(Coordinate pt)
{
return LocationIndexOfPoint.IndexOf(_linearGeom, pt);
}

public LinearLocation Project(Coordinate pt)
{
return LocationIndexOfPoint.IndexOf(_linearGeom, pt);
}

Is the documentation outdated, or is it a mistake in the implementation?

@FObermaier FObermaier added the upstream-investigate The issue may be present in JTS as well, but we need to investigate to be sure one way or the other. label Nov 23, 2022
@FObermaier
Copy link
Member

Looks the same in upstream JTS. Will report it there.

@peetw
Copy link
Contributor Author

peetw commented Jan 11, 2023

JTS issue (for reference): locationtech/jts#937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream-investigate The issue may be present in JTS as well, but we need to investigate to be sure one way or the other.
Projects
None yet
Development

No branches or pull requests

2 participants