Given a reference point P with known latitude and longitude, and a given
distance d around this point, is it possible to calculate (using geotools
API) the minimum and maximum latitude and longitude (latmin, matmax, lonmin,
lonmax) that are tangent to the circle whose center is P and radius is d?

What I'm trying to achieve is the following:
My application stores geographic points in a database table using their GPS
latitude, longitude and altitude (related to WGS84).
I want to retrieve all the points in this table whose distance with my
reference location is less than a given value.
For now, what I'm doing is pretty trivial: I retrieve all the points in the
table and iterate over them to calculate the distance with my reference
location (using GeodeticCalculator). This works fine for testing but
obviously it's gonna break in production as stored data grows.
What I want to do now is, instead of iterating over ALL the points in the
database, I want to pre-select those whose latitude is between latmin and
latmax and longitude is between lonminand lonmax, which can easily be
translated into an SQL query. Then, as all those points are not in the
circle, I can calculate the geodetic distance to be more specific.

Is there a way to calculate those latmin, latmax, lonmin and lonmax values
using GeoTools API?

Thanks in advance.
Best regards,

--
Sébastien Arbogast

http://www.sebastien-arbogast.com
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to