我有一个类型为GeodeticDatum
的实例。我可以使用方法获得椭球体名称、展平、轴datum.getEllipsoid()
和getName()
、getInverseFlattening()
等。
如何在不将基准转换为 WKT 字符串并手动解析的情况下获取 Bursa-Wolf 参数 (towgs84(?
DATUM["New Zealand Geodetic Datum 1949",
SPHEROID["International 1924", 6378388.0, 297.0],
TOWGS84[59.47, -5.04, 187.44, 0.47, -0.1, 1.024, -4.5993]]
ProjectedCRS crsFromWkt = (ProjectedCRS) CRS.parseWKT(/*OGC WKT of your projected coordinate system*/):
DefaultGeodeticDatum defaultGeodeticDatum = new DefaultGeodeticDatum(crsFromWkt.getDatum());
System.out.println(defaultGeodeticDatum.getBursaWolfParameters()[0].dx);
System.out.println(defaultGeodeticDatum.getBursaWolfParameters()[0].dy);
System.out.println(defaultGeodeticDatum.getBursaWolfParameters()[0].dz);
System.out.println(defaultGeodeticDatum.getBursaWolfParameters()[0].ex);
System.out.println(defaultGeodeticDatum.getBursaWolfParameters()[0].ey);
System.out.println(defaultGeodeticDatum.getBursaWolfParameters()[0].ez);
System.out.println(defaultGeodeticDatum.getBursaWolfParameters()[0].ppm);