Class Geo3DUtil


  • class Geo3DUtil
    extends java.lang.Object
    • Field Detail

      • RADIANS_PER_DEGREE

        static final double RADIANS_PER_DEGREE
        How many radians are in one degree
        See Also:
        Constant Field Values
    • Constructor Detail

      • Geo3DUtil

        Geo3DUtil()
    • Method Detail

      • decodeValueFloor

        static double decodeValueFloor​(int x,
                                       PlanetModel planetModel)
        Returns smallest double that would encode to int x.
      • decodeValueCeil

        static double decodeValueCeil​(int x,
                                      PlanetModel planetModel)
        Returns largest double that would encode to int x.
      • fromDegrees

        static double fromDegrees​(double degrees)
        Converts degress to radians
      • fromPolygon

        static GeoPolygon fromPolygon​(PlanetModel planetModel,
                                      Polygon... polygons)
        Convert a set of Polygon objects into a GeoPolygon.
        Parameters:
        polygons - are the Polygon objects.
        Returns:
        the GeoPolygon.
      • fromLargePolygon

        static GeoPolygon fromLargePolygon​(PlanetModel planetModel,
                                           Polygon... polygons)
        Convert a Polygon object to a large GeoPolygon.
        Parameters:
        polygons - is the list of polygons to convert.
        Returns:
        the large GeoPolygon.
      • fromPath

        static GeoPath fromPath​(PlanetModel planetModel,
                                double[] pathLatitudes,
                                double[] pathLongitudes,
                                double pathWidthMeters)
        Convert input parameters to a path.
        Parameters:
        pathLatitudes - latitude values for points of the path: must be within standard +/-90 coordinate bounds.
        pathLongitudes - longitude values for points of the path: must be within standard +/-180 coordinate bounds.
        pathWidthMeters - width of the path in meters.
        Returns:
        the path.
      • fromDistance

        static GeoCircle fromDistance​(PlanetModel planetModel,
                                      double latitude,
                                      double longitude,
                                      double radiusMeters)
        Convert input parameters to a circle.
        Parameters:
        latitude - latitude at the center: must be within standard +/-90 coordinate bounds.
        longitude - longitude at the center: must be within standard +/-180 coordinate bounds.
        radiusMeters - maximum distance from the center in meters: must be non-negative and finite.
        Returns:
        the circle.
      • fromBox

        static GeoBBox fromBox​(PlanetModel planetModel,
                               double minLatitude,
                               double maxLatitude,
                               double minLongitude,
                               double maxLongitude)
        Convert input parameters to a box.
        Parameters:
        minLatitude - latitude lower bound: must be within standard +/-90 coordinate bounds.
        maxLatitude - latitude upper bound: must be within standard +/-90 coordinate bounds.
        minLongitude - longitude lower bound: must be within standard +/-180 coordinate bounds.
        maxLongitude - longitude upper bound: must be within standard +/-180 coordinate bounds.
        Returns:
        the box.
      • fromPolygon

        private static GeoPolygon fromPolygon​(PlanetModel planetModel,
                                              Polygon polygon)
        Convert a Polygon object into a GeoPolygon. This method uses
        Parameters:
        polygon - is the Polygon object.
        Returns:
        the GeoPolygon.
      • convertToDescription

        private static java.util.List<GeoPolygonFactory.PolygonDescription> convertToDescription​(PlanetModel planetModel,
                                                                                                 Polygon... polygons)
        Convert a list of polygons to a list of polygon descriptions.
        Parameters:
        polygons - is the list of polygons to convert.
        Returns:
        the list of polygon descriptions.