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

Bugs/5953 bug bbox #100

Merged
merged 3 commits into from
Dec 9, 2024
Merged

Bugs/5953 bug bbox #100

merged 3 commits into from
Dec 9, 2024

Conversation

utas-raymondng
Copy link
Collaborator

Fix bug where any input value from frontend will be handle correctly by the CQL BBOX by adjust it within [-180, 180], geo_bounding_box in elastic require bbox to work within this range

Comment on lines +36 to +43
if(maxx >= 0 && maxx <= 180) {
// Normal case
polygons.add((Polygon)createBoxPolygon(minx, maxx, miny, maxy));
}
else {
polygons.add((Polygon)createBoxPolygon(minx, 180, miny, maxy));
polygons.add((Polygon)createBoxPolygon(-180, maxx, miny, maxy));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

so you call createBoxPolygon and cast the result to Polygon, can we make return type of createBoxPolygon to Polygon with validating valid polygon?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can

@vietnguyengit vietnguyengit merged commit 0a9e6e8 into main Dec 9, 2024
2 checks passed
@vietnguyengit vietnguyengit deleted the bugs/5953-bug-bbox branch December 9, 2024 00:00
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.

2 participants