gpt4 book ai didi

kml - 构建大型 KML 文件

转载 作者:行者123 更新时间:2023-12-01 08:38:06 32 4
gpt4 key购买 nike

我生成的 KML 文件可能有 50,000 个或更多地标,根据特定于域的分组排列在文件夹中。 KML 文件使用打包到 KMZ 文件中的自定义图像。

我希望将单个 KML 文件分解为多个文件,根据分组进行分区,因此与其拥有 1 个带文件夹的大文档,不如拥有一个根/索引 KML 文件,其中的文件夹链接到较小的 KML 文件。

这可能吗?我认为 KMZ 文件在 zip 中只能包含 1 个 KML 文件,无论它位于何处或其名称。此外,我不确定 KML 文件如何链接到另一个 KML 文件。是将其作为 <NetworkLink> 到本地文件的唯一方法吗? <NetworkLink> 可以链接到同一 KMZ 中的本地文件吗?

最佳答案

是的,您可以使用网络链接来完成此操作,据我所知,这是完成您所要求的唯一方法。是的,您可以在网络链接中引用本地文件

请参阅:http://code.google.com/intl/nl-NL/apis/kml/documentation/kml_tut.html(搜索“网络链接”),其中说:

A network link contains a element with an (a hypertext reference) that loads a file. The can be a local file specification or an absolute URL. Despite the name, a <NetworkLink> does not necessarily load files from the network. The <href> in a link specifies the location of any of the following:

• An image file used by icons in icon styles, ground overlays, and screen overlays
• A model file used in the element
• A KML or KMZ file loaded by a Network Link



不,您不能引用 kmz 中的另一个文件。一个kmz只能包含1个kml文件(不过也可以包含其他类型的文件)你可以找到kmz文件的布局以及可以放入的内容 here 特别注意以下部分:

2.Put the default KML file (doc.kml, or whatever name you want to give it) at the top level within this folder. Include only one .kml file. (When Google Earth opens a KMZ file, it scans the file, looking for the first .kml file in this list. It ignores all subsequent .kml files, if any, in the archive. If the archive contains multiple .kml files, you cannot be sure which one will be found first, so you need to include only one.)



最后一点是,您的问题并不能说明您是否需要将这 50.000 个地标作为离线文件。如果您可以动态地为它们提供服务,您可以使用基于区域的链接,其中 GE 会告诉您客户端的查看区域,以便您可以返回一小部分航点(仅那些在用户 View 内的)有关更多信息 this 是要点击的链接。

关于kml - 构建大型 KML 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7435196/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com