简体   繁体   English

使用 KML 绘制网格数据

[英]Plotting gridded data using KML

We are beginning a project to visualize the results of a finite volume (FV) calculation using Google Earth.我们正在开始一个项目,以使用 Google 地球将有限体积 (FV) 计算的结果可视化。 The FV data is essentially 2d (lat/long) data consisting of a Cartesian array of values (sea surface height, for example). FV 数据本质上是 2d(纬度/经度)数据,由笛卡尔值数组(例如海面高度)组成。 Each value should be mapped to a color from some colormap, and then displayed as a single mesh cell in a gridded array suitable for Google Earth.每个值都应该映射到某个颜色图中的一种颜色,然后在适合 Google 地球的网格阵列中显示为单个网格单元。 The Cartesian array could be 100x100 or larger.笛卡尔数组可以是 100x100 或更大。

My question is, do we construct polygons for each mesh cell C_{ij} in the array, assigning a color corresponding to the q_{ij} value for that mesh cell?我的问题是,我们是否为数组中的每个网格单元 C_{ij} 构造多边形,并为该网格单元分配与 q_{ij} 值相对应的颜色? This would seem to create a huge KML file, if the coordinates of the four corners of every mesh cell must be described, (ie 10,000 polygons, for example).如果必须描述每个网格单元的四个角的坐标(例如,10,000 个多边形),这似乎会创建一个巨大的 KML 文件。

Or are there KML tools we could use that would allow us to specify, for example, the lower and upper coordinates of the array, a generic mesh cell size (eg dX, dY values), and the array of q data (or, equivalently, colours) that should be used to fill the "patch"?或者我们是否可以使用 KML 工具来指定,例如,数组的下坐标和上坐标、通用网格单元大小(例如 dX、dY 值)和 q 数据数组(或等效的,颜色)应该用来填充“补丁”?

Alternatively, we could create an image file, containing for example, a rendered image of our data array (created by some other means), and then referenced from the KML file.或者,我们可以创建一个图像文件,例如包含我们数据数组的渲染图像(通过其他方式创建),然后从 KML 文件中引用。

Our aim is to use PyKML for this project.我们的目标是在这个项目中使用 PyKML。

Any suggestions would be very helpful.任何建议都会非常有帮助。

After much digging around, I think I now have a better understanding of what Google Earth can and cannot do, (or is not designed to do).经过大量的挖掘,我想我现在对谷歌地球可以做什么和不能做什么(或不打算做什么)有了更好的理解。 It seems that Google Earth is not designed as a visualization tool for numerical data.似乎 Google Earth 并不是设计为数值数据的可视化工具。 This does not mean it cannot be done, but that one must create the image files elsewhere, and then overlay them onto Google Earth.这并不意味着它不能完成,而是必须在别处创建图像文件,然后将它们叠加到 Google 地球上。 For example, this link provides instructions for visualizing the output from a fire modeling code :例如,此链接提供了可视化火灾建模代码输出的说明:

      http://www.openwfm.org/wiki/Visualization_in_Google_Earth

The instructions here suggests how pseudocolor plots can used in at least one special case to visualize output in Google Earth.此处的说明建议如何在至少一种特殊情况下使用伪彩色图来可视化 Google 地球中的输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM