坐标转换并导出KML文件

问题:将PDF图纸中的线文件(2000投影坐标,中央子午线120),导出KML文件放到LSV中。
在这里插入图片描述

解决问题:
一、 进行矢量化,在CAD中根据坐标,将点、线、面进行矢量还原

在这里插入图片描述

二、 在SuperMap中添加数据源,导入数据集,数据集类型选择-简单数据集。
在这里插入图片描述

三、 在属性中添加投影坐标系。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
要将Java中的坐标转换KML文件格式,您可以使用Java KML库,如JAK库。以下是一个示例代码,可将WGS84坐标转换KML格式,并将其导出KML文件: ```java import de.micromata.opengis.kml.v_2_2_0.*; public class KMLExporter { public static void main(String[] args) { // Create a new KML document Kml kml = new Kml(); // Create a new placemark Placemark placemark = KmlFactory.createPlacemark(); // Set the placemark name placemark.withName("My Placemark"); // Set the placemark description placemark.withDescription("This is my placemark"); // Create a new point with WGS84 coordinates Point point = KmlFactory.createPoint() .withCoordinates(new Coordinate(-122.0822035425683, 37.42228990140251, 0)); // Set the placemark geometry to the point placemark.withGeometry(point); // Add the placemark to the KML document kml.createAndSetPlacemark().withName(placemark.getName()) .withDescription(placemark.getDescription()) .withGeometry(placemark.getGeometry()); // Export the KML document to a file KmlMarshaller.marshal(kml, new File("my_placemark.kml")); System.out.println("KML file exported successfully!"); } } ``` 在上面的示例中,我们使用了JAK库来创建一个新的KML文档,并将一个名为“My Placemark”的点添加到其中。点的坐标是经度为-122.0822035425683,纬度为37.42228990140251,高度为0的WGS84坐标。最后,我们将KML文档导出到名为“my_placemark.kml”的文件中。 请注意,您需要在项目中包含JAK库的JAR文件以运行此代码。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

冰城孑孓

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值