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

Bbox #421

Merged
merged 6 commits into from
Jun 14, 2019
Merged

Bbox #421

merged 6 commits into from
Jun 14, 2019

Conversation

Gerungofulus
Copy link
Contributor

Extension of #364 by @hbruch:
I basically just rebased origin/master as all previous remarks had already been fixed by hbruch

hbruch and others added 3 commits June 14, 2019 16:51
Signed-off-by: Holger Bruch <[email protected]>
# Conflicts:
#	src/main/java/de/komoot/photon/query/PhotonRequestFactory.java
Signed-off-by: Holger Bruch <[email protected]>
# Conflicts:
#	src/main/java/de/komoot/photon/query/PhotonRequestFactory.java
The previous test request was not consistent with the spec given in the documentation. I just swapped the latitude values.
if (minLat > 90.0 || minLat < -90.00 || maxLat > 90.0 || maxLat < -90.00) {
throw new BadRequestException(400, INVALID_BBOX_ERROR_MESSAGE);
}
bbox = new Envelope(minLon, minLat, maxLon, maxLat);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a double error in here that happens to cancel itself out. bbox above is parsed as (minLon, maxLon, minLat, maxLat) while it should be (minLon, minLat, MaxLon, MaxLat). In the constructor for Envelope the exact reverse is true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed code according to the documentation

@lonvia lonvia mentioned this pull request Jun 14, 2019
@lonvia lonvia merged commit 84145a9 into komoot:master Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants