gps - Latitude,longitude and geographical quarter (NW, NE, SW, SE) from a center to a given point -


considering latitude , longitude, looking way know in quarter located point given center.

 nw             ne   ......|......   ..x...|......   ......|......   ------x------   ......|......   ......|......   ......|...... sw             se 

ignoring poles , antimeridian (where longitude = +/- 180), it's straightforward:

if(lat > centerlat)   if(long < centerlong)     nw   if(long > centerlong     ne  if(lat < centerlat)   if(long < centerlong)     sw   if(long > centerlong     se 

if need work near antimeridian, translate whole system east adding 180 degrees longitudes.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -