在谷歌地图上覆盖 ESRI shapefile 的最佳方法? [英] Best way to overlay an ESRI shapefile on google maps?

查看:24
本文介绍了在谷歌地图上覆盖 ESRI shapefile 的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Google 地图中叠加 shapefile 的最佳方法是什么?

What is the best way to overlay a shapefile in Google Maps?

经过一些阅读建议,将 shapefile 转换为 KML 并在 Google 地图中覆盖 KML 是一种选择.如果是这种情况,我如何将 shapefile 转换为 KML?

After some reading suggests that, converting shapefile into KML and overlaying KML in Google map is an option. If that is the case, how do I convert a shapefile into KMLs?

我相信会有一些开源工具可用于这种转换.任何人都可以指出一种工具来将 shapefile 转换为 KML 而不会丢失任何数据吗?

I believe there would be a few open source tools available for this conversion. Can anyone point to a tool to covert a shapefile to KML without any loss of data?

推荐答案

我喜欢使用(开源和 gui 友好)QuantumGIS 将 shapefile 转换为 kml.

I like using (open source and gui friendly) Quantum GIS to convert the shapefile to kml.

Google Maps API 仅支持 KML 标准的子集.一个限制是文件大小.

Google Maps API supports only a subset of the KML standard. One limitation is file size.

要减小文件大小,您可以使用Quantum GIS 的简化几何"功能.这会平滑"多边形.

To reduce your file size, you can Quantum GIS's "simplify geometries" function. This "smooths" polygons.

然后您可以选择您的图层并对其进行另存为kml".

Then you can select your layer and do a "save as kml" on it.

如果您需要处理一堆文件,可以使用 osgeo4w shell 中的 Quantum GIS 的 ogr2ogr 命令批量处理.

If you need to process a bunch of files, the process can be batched with Quantum GIS's ogr2ogr command from osgeo4w shell.

最后,我建议压缩您的 kml(使用您最喜欢的压缩程序)以减小文件大小并将其保存为 kmz.

Finally, I recommend zipping your kml (with your favorite compression program) for reduced file size and saving it as kmz.

这篇关于在谷歌地图上覆盖 ESRI shapefile 的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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