【问题标题】:Meters to Decimal degrees. High precision米到十进制度。高精准度
【发布时间】:2016-06-14 14:11:11
【问题描述】:

我正在使用 Java 开发一种用于 GPS 精度的工具。 我对 Lat Lon 有意见,需要建立一个具有一定半径的圆。

这样的问题很多,但在我的情况下,半径通常在 10 米左右,+-5 米,我需要它非常精确。

为了建立一个圈子,我使用JTS

有一个代码示例:

    import com.vividsolutions.jts.geom.*;



    public static final int SRID = 4326;
    public static PrecisionModel precisionModel = new PrecisionModel(PrecisionModel.maximumPreciseValue);
    public static GeometryFactory geometryFactory = new GeometryFactory(precisionModel, SRID);

    public static Polygon createCircle(Point initialPoint, int coverArea){

    GeometricShapeFactory gsf = new GeometricShapeFactory(geometryFactory);
    ArrayList<Point> pointsOfIntersection = new ArrayList<>();

       // double radius = getRadius(point);
        double size = 0.0001 * coverArea/100;

        gsf.setSize(size);
        gsf.setNumPoints(50);
        gsf.setCentre(point.getCoordinate());
        Polygon circle = gsf.createCircle();

       return circle;
      }

基本上我有一个带坐标的中心点,并将根据该点获得一个直径(5 - 20 米),之后我需要将该半径调整为coverArea 系数(1 - 100 %)并设置一个大小十进制度数的圆。

目前我使用 0.0001 值进行测试,根据 wikipedia 得出的值约为 10.247 米。

所以我需要一个简单有效的公式来将米转换为十进制度。

【问题讨论】:

标签: java gis geospatial jts


【解决方案1】:

十进制度的精度取决于您使用的小数位数。

https://en.wikipedia.org/wiki/Decimal_degrees

只需使用更多即可实现您想要的(5-15 米长)。

【讨论】:

  • 是的,我知道,但这也取决于纬度......而且我在互联网上找到的所有公式都没有给出 1 米以内的准确度。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-08-17
  • 2014-10-03
  • 1970-01-01
  • 2021-11-04
  • 1970-01-01
  • 2018-01-20
相关资源
最近更新 更多