Package org.h2gis.functions.spatial.earth

## Class SunCalc

- java.lang.Object
- - org.h2gis.functions.spatial.earth.SunCalc

    public class SunCalc
    extends Object

This class is a partial Java port of SunCalc. A BSD-licensed JavaScript library for calculating sun position, sunlight phases (times for sunrise, sunset, dusk, etc.), moon position and lunar phase for the given location and time, created by Vladimir Agafonkin (@mourner) as a part of the SunCalc.net project.

Author:
  Erwan Bocher

### Method Summary

All Methods Static Methods Concrete Methods
`static org.locationtech.jts.geom.Coordinate` `getPosition​(Date date, double lat, double lng)` Returns the sun position as a coordinate with the following properties x: sun azimuth in radians (direction along the horizon, measured from south to west), e.g.
`static boolean` `isGeographic​(double latitude, double longitude)` Test if the point has valid latitude and longitude coordinates.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getPosition

    public static org.locationtech.jts.geom.Coordinate getPosition​(Date date,
                                                                   double lat,
                                                                   double lng)

Returns the sun position as a coordinate with the following properties x: sun azimuth in radians (direction along the horizon, measured from south to west), e.g. 0 is south and Math.PI * 3/4 is northwest. y: sun altitude above the horizon in radians, e.g. 0 at the horizon and PI/2 at the zenith (straight over your head).

Parameters:
  `date` -
  `lat` -
  `lng` -
Returns:

#### isGeographic

    public static boolean isGeographic​(double latitude,
                                       double longitude)

Test if the point has valid latitude and longitude coordinates.

Parameters:
  `latitude` -
  `longitude` -
Returns: