建立大型KML档案 [英] Building large KML file

查看:77
本文介绍了建立大型KML档案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I generate KML files which may have 50,000 placemarks or more, arranged in Folders based on a domain-specific grouping. The KML file uses custom images which are packed in to a KMZ file.

我希望将单个KML文件分解为多个文件,并根据分组进行分区,因此,我将拥有一个根/索引KML文件,其中的文件夹链接到较小的文件,而不是包含一个带有文件夹的大文件KML文件.

I'm looking to breakup the single KML file in to multiple files, partitioned based on the grouping, so rather than having 1 large document with folders, i'd have a root/index KML file with folders linking to the smaller KML files.

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

Is this possible though? I think that a KMZ file can contain only 1 KML file, regardless of where it's located or its name, in the zip. Furthermore, I'm not exactly sure how a KML file can link to another KML file. Is the only way to have it as a <NetworkLink> to a local file? Can a <NetworkLink> work to link to a file local in the same KMZ?

推荐答案

是的,您可以使用网络链接来完成此任务,据我所知,这是执行您所要求的唯一方法.是的,您可以在网络链接"中引用本地文件

Yes you can use a networklink to accomplish this and as far as I know it's the only way to do what you ask. And yes you can reference local files in Network links

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

See: http://code.google.com/intl/nl-NL/apis/kml/documentation/kml_tut.html (search for "Network Links") where it says:

网络链接包含带有(超文本 参考)加载文件.可以是本地文件 规范或绝对URL.尽管有名称,但< NetworkLink> 不一定从网络加载文件. < href>在一个 链接指定以下任意位置:

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:

•图标样式,地面叠加层和屏幕叠加层中的图标使用的图像文件
•元素
中使用的模型文件 •网络链接加载的KML或KMZ文件

• 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文件的布局以及它们可能放置的内容

No you can't reference to another file inside a kmz. A kmz can only contain 1 kml file (it can contain other type of files though) You can find the layout of kmz files and what may be put in them here Specifically note the following section:

2.放入默认的KML文件(doc.kml或您要提供的任何名称) 它)在此文件夹的顶层.仅包含一个.kml文件. ("Google地球"打开KMZ文件时,会扫描该文件,寻找 此列表中的第一个.kml文件.它会忽略所有后续的.kml 文件(如果有)在存档中.如果归档文件包含多个.kml 文件,您无法确定将首先找到哪个文件,因此您需要 只包含一个.)

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会在该链接中告诉您客户的查看区域,以便您可以返回路标的一小部分(仅用户视图内的路标). href ="http://code.google.com/intl/nl-NL/apis/kml/documentation/regions.html" rel ="nofollow">这是单击的链接.

One final remark is that your question doesn't tell anything if you need these 50.000 placemarks as offline files or not. If you could serve them dynamically you could use the region based links where GE will tell you the viewing region of the client so you can return a small subset of the waypoints (only the ones that are inside the users view) For more info this is the link to click on.

这篇关于建立大型KML档案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆