I have a set (2 or more) of coordinates with a given Latitude and Longitude. How to compute the Upper Left Corner and Lower Down Corner of a bounding box on the map in Java
Asked
Active
Viewed 2,845 times
0
-
Can you post your solution if you found it? – nirvair Jul 12 '17 at 13:08
1 Answers
0
You could cheat and use Rectangle2D.Double. You can Point2D objects to it. This give you the upper limit (x+width/y+height) and lower limit (x/y)
When all you have is a hammer, all your problems look like nails - sorry if this is quite what your looking for, it's just what came to mind

MadProgrammer
- 343,457
- 22
- 230
- 366
-
This solution doesn't take into account that we are working with sphere ( the Earth) not with a plane. – Ivan T Aug 30 '12 at 14:29
-
Point, try having a look at http://stackoverflow.com/questions/120283/working-with-latitude-longitude-values-in-java and http://stackoverflow.com/questions/238260/how-to-calculate-the-bounding-box-for-a-given-lat-lng-location and http://geokit.rubyforge.org/api/geokit-gem/index.html while, strickly not all in Java that should provide you some jumping off points – MadProgrammer Aug 30 '12 at 20:17