Class GeoUtil

java.lang.Object
cn.mapway.common.geo.tools.GeoUtil

public class GeoUtil extends Object
地理相关的工具类
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
     
    static cn.mapway.geo.geometry.GeoPolygon
    randomPolygon(cn.mapway.geo.geometry.GeoExtend extend)
    在 extend范围内 随机产生一个多边形
    static double
    slerp(double x0, double x1, double t)
    线性内插 y=x0+(x1-x0)*t

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GeoUtil

      public GeoUtil()
  • Method Details

    • slerp

      public static double slerp(double x0, double x1, double t)
      线性内插 y=x0+(x1-x0)*t
      Parameters:
      x0 -
      x1 -
      t - [0,1]
      Returns:
    • randomPolygon

      public static cn.mapway.geo.geometry.GeoPolygon randomPolygon(cn.mapway.geo.geometry.GeoExtend extend)
      在 extend范围内 随机产生一个多边形
      Parameters:
      extend -
      Returns:
    • main

      public static void main(String[] args)