借助 Google 地球,您可以导入自己的地理空间数据,以便查看、分析和分享。您可以通过多种方式导入数据,具体取决于文件类型、大小以及您希望如何使用数据:
- 作为地图地图项:适用于包含最多 10,000 个地图项或 250,000 个顶点的简单 KML/KMZ 文件。这些地图项会直接添加到 Google 云端硬盘中的 Google 地球项目中,并且可以修改。过大的文件会自动作为数据层加载。
- 作为数据层:非常适合大型数据集(KML、GeoJSON、shapefile)。数据图层经过性能优化,嵌入在 Google 地球项目中,并存储在 Google 云端硬盘中。可以设置样式,但无法修改。 数据层会占用 Google 地球存储空间配额。
- 作为本地 KML 文件:打开存储在设备上的 KML/KMZ 文件。这些项目不属于基于云端硬盘的项目,并且只能在打开它们的设备上查看。
如需详细了解图层、地图地图项和本地文件之间的区别,请参阅了解 Google 地球项目和本地 KML 文件。
如果您要将数据从 Google 地球 Pro(桌面版)迁移到 Google 地球(网页版),请参阅将数据从 Google 地球 Pro(桌面版)迁移到 Google 地球(网页版)。
计算机
作为数据层导入
此方法最适合直观呈现大型数据集。
支持的文件格式:
- KML、KMZ
- GeoJSON
- Shapefile(ZIP 文件)
- CSV (
.csv)(实验性) - Google 表格(来自 Google 云端硬盘)(实验性功能)
如需将文件作为数据层导入,请执行以下操作:
- 在计算机上打开 Google 地球,并确保您已登录。
- 您可以通过以下几种方式开始导入:
- 在主屏幕上:依次点击新建 导入文件。
- 在项目菜单中:依次点击文件 导入…
- 从设备或 Google 云端硬盘中选择文件。
- 在导入对话框中,选择作为数据层导入。如果您的文件很大或不适合地图项,此选项可能会预先选中或成为唯一选项。
- 对于除 KML 以外的所有文件类型,系统会预先选择此选项。
- 表格数据集会作为 Google 地球数据层提取。
- 系统会上传并处理该文件。您可以在导入 widget 中跟踪进度。大文件可能需要一些时间。
完成后,该图层将添加到您打开的项目中,如果未打开任何项目,则会添加到新项目中。
导入的数据层受存储空间配额限制,具体取决于您的 Google 地球方案。如需了解详情,请参阅管理导入的数据层和存储空间。
导入 CSV 和 Google 表格文件(实验性功能)
下表介绍了 CSV 和 Google 表格文件支持的格式。
| 格式类型 | 说明 | 示例 |
|---|---|---|
| 纬度和经度(单独的列) | 两个单独的列,其中包含 WGS84 边界内(纬度 -90.0 到 90.0,经度 -180.0 到 180.0)带符号十进制度数的数字坐标值。坐标不得包含度数符号 (°) 或基本方向字母(N、S、E、W)。负值表示南纬和西经。 |
|
| 已知文本 (WKT) | 包含标准 WKT 几何图形(例如 POINT、POLYGON、LINESTRING)的列。坐标必须采用 WGS84 十进制度数(经度 -180.0 到 180.0,纬度 -90.0 到 90.0),并使用标准的经度纬度顺序(例如 POINT(-122.084
37.422))。WKT 关键字和标头不区分大小写。 |
|
| “地址”列 | 包含完整街道地址的列。Google 地球可识别单列街道地址,并在全球范围内对其进行地理编码。 |
|
其他非空间列(例如名称、日期、说明、类别或数字指标)会自动保留为特征属性,并显示在数据表和属性检查卡片中。
错误处理
如果某一行包含无效坐标或无法由地理编码器解析,Google 地球仍会导入所有其他有效行。如果文件中无法自动检测到任何几何图形,导入对话框会显示错误,引导您检查列格式。
将地图项导入 Google 地球项目
此方法适用于包含最多 10,000 个地图项的 KML 或 KMZ 文件。
如需将文件导入现有项目,请执行以下操作:
- 在计算机上打开 Google 地球,并确保您已登录。
- 在主屏幕中,点击现有项目。
- 依次点击左上角的文件 将文件导入到“{Project name}”。
- 如要添加 Google 云端硬盘中的文件,请点击从云端硬盘导入。
- 如需直接从电脑添加文件,请点击从设备上传。
- 选择要导入的文件。
- 如果系统提示您选择输出类型,请选择作为项目特征导入。
选择要导入的文件后,该文件会自动添加到现有的 Google 地球项目中。
如需前往主屏幕,请点击“地球”图标
。
将文件导入新项目
您可以将旧版 Google 地球中的 KML 或 KMZ 文件(最多包含 10,000 个地图项)导入到新项目中。
如需将文件导入到新的 Google 地球项目中,请执行以下操作:
- 在计算机上打开 Google 地球。
- 点击左上角的新建 将文件导入到项目。
- 如要添加 Google 云端硬盘中的文件,请点击从云端硬盘导入。
- 如需直接从电脑添加文件,请点击从设备上传。
- 选择要导入的文件。
选择要导入的文件后,系统会自动创建一个新项目并将其保存在 Google 云端硬盘中。
如需前往主屏幕,请点击“地球”图标
。
将“我的地图”文件导入新项目
您可以直接从 Google 云端硬盘打开在 Google 我的地图中创建的地图,并在 Google 地球界面中查看。
如需打开并转换“我的地图”文件,请执行以下操作:
- 在计算机上打开 Google 地球。
- 依次点击新建 > 从云端硬盘打开“我的地图”。
- 在 Google 云端硬盘窗口中找到您的“我的地图”文件,选中该文件,然后点击插入。
- 现在,“我的地图”文件将以“只能查看”模式显示在 Google 地球中。
- 如需使数据可修改,请点击顶部工具栏中的复制到地图项目(仅适用于网页版)。
- 系统会提示您选择是否重命名项目标题并更新共享权限。完成后,点击确定。
您的地图现已保存为新的可编辑 Google 地球地图项目。原始“我的地图”文件会原封不动地保留在您的 Google 云端硬盘中。
在 Google 地球中打开本地 KML 文件
您可以将旧版 Google 地球中的 KML 或 KMZ 文件(无功能限制)作为本地 KML 文件打开。
如需在 Google 地球中打开本地 KML 文件,请执行以下操作:
1. On your computer, open <a href="https://earth.google.com/">Google Earth</a>.
2. At the bottom left on the home screen, click **Open local KML editor**.
3. Click **Open KML from device**.
4. Select the KML file you want to open.
After you select the file you want to open, any changes must be explicitly saved
or downloaded back to your computer's file system to avoid losing work. Autosave
is supported only on Chromium-based desktop browsers.
Note: You can open local KML files in Google Earth even if you're not signed in.
To go to the home screen, click Earth <img src="/maps/documentation/earth/images/earth-logo.png" class="inline-icon" alt="Google Earth
logo">.
## Import other file formats {:#import_other_file_formats}
Google Earth for web and mobile primarily supports KML, KMZ, GeoJSON, and
Shapefile (`.zip`) for direct import.
For [CSV and Google Sheets files](#import-csv-and-google-sheets-files),
Google Earth supports direct import as a data layer with automatic location
detection. For other vector or raster formats (for example, GPX), you can
convert these files to KML or CSV. Once converted to KML, you can import them
into Google Earth.
[Learn how to use KML
features](https://developers.google.com/kml/documentation/).
将数据从 Google 地球 Pro(桌面版)迁移到 Google 地球网页版
If you are moving from Google Earth Pro (Desktop) to the web version, you can
bring your "My Places" data with you.
### Prepare your data for migration {:#prepare_your_data_for_migration}
Before importing, you must export your data from Google Earth Pro:
1. Open **Google Earth Pro** on your computer.
1. In the "Places" panel on the left, right-click on **My Places** or a
specific folder.
1. Select **Save Place As...**.
1. Save the file as a `.kmz` or `.kml` to your computer.
If you cannot open Google Earth Pro or need to find the raw source files
(typically named `myplaces.kml`), they are stored in the following directories.
Note: These folders are often hidden by default.
#### Windows {:#windows}
Copy and paste the following path into your File Explorer address bar:
`%USERPROFILE%\AppData\Local\Google\GoogleEarth`.
Tip: If you are navigating manually, you may need to enable "Hidden items" under
the View tab in File Explorer to see the `AppData` folder.
#### macOS {:#macos}
Open Finder, press **Command** + **Shift** + **G**, and paste this path:
`~/Library/Application Support/Google Earth`.
What to look for:
- `myplaces.kml`: This is your current, live data.
- `myplaces.backup.kml`: A backup created the last time you launched the app.
- `myplaces.kml.tmp`: A temporary file created during a session.
### Import capabilities and limitations {:#import_capabilities_and_limitations}
When migrating "My Places," your choice of import method depends on the
complexity of your data. For a detailed breakdown of supported KML elements,
refer to the [Google Earth KML Import
Guide](https://support.google.com/earth/community-guide/307322063/google-earth-kml-import-guide).
- **Feature Counts**: If you intend to import your data as project features
(allowing you to edit icons, lines, and shapes), there is a limit of
approximately 10,000 features or 250,000 vertices per project. If an import
exceeds these limits, Google Earth will automatically attempt to import your
data as a read-only data layer instead.
- **Large "My Places" Files**: For Google Earth Pro on desktop users that have
"My Places" files that exceed 10,000 features or contain several megabytes
of data we recommend you:
- **Split your data**: Divide your "My Places" into smaller, thematic
folders in Earth Pro and save each as a separate `.kmz` file.
- **Import as Data Layers**: If you have tens of thousands of points and
don't need to edit them individually, use the **Import as a data layer**
option.
- **Copy and Paste**: You can also copy individual features or folders from
Google Earth Pro and paste them directly into a Google Earth project. Simply
select the feature in the desktop version, right-click to Copy (**Ctrl** +
**C** or **Cmd** + **C**), go to your Google Earth browser tab, and Paste
(**Ctrl** + **V** or **Cmd** + **V**) while a project is open.
## Other viewing options {:#other_viewing_options}
For temporary, local-only access, you can also open your KML files directly in
Google Earth on web through the local KML editor experience.
Note: This mode does not support cloud storage or advanced project features.
To see data from multiple projects on the map at once, you can use the
[reference projects](https://medium.com/google-earth/enhancing-project-management-in-google-earth-a-guide-to-the-latest-updates-ad096c34d239)
feature.
Android
将文件导入现有 Google 地球项目
您可以将旧版 Google 地球中的简单 KML 或 KMZ 文件导入到现有 Google 地球项目中。如需将文件导入现有 Google 地球项目,请执行以下操作:
- 在 Android 手机或平板电脑上,打开 Google 地球应用
。 - 在主屏幕上,点按现有项目。
- 依次点按底部的更多 将 KML/KMZ 导入项目。
- 如要添加 Google 云端硬盘中的文件,请点按从云端硬盘导入。
- 如需直接从设备添加文件,请点按从设备上传。
- 选择要导入的文件。
- 如需返回地图并打开文件,请点按 返回。
选择要导入的文件后,该文件会自动添加到现有项目中。
将文件导入新项目
您可以将旧版 Google 地球中的简单 KML 或 KMZ 文件导入到现有项目中。如需将文件导入现有项目,请执行以下操作:
- 在 Android 手机或平板电脑上,打开 Google 地球应用
。 - 点按底部的新建。
- 如要添加 Google 云端硬盘中的文件,请点按将文件从云端硬盘导入项目。
- 如需直接从设备添加文件,请点按将文件从设备导入项目。
- 选择要导入的文件。
- 如需返回地图并打开文件,请点按 返回。
选择要导入的文件后,该文件会自动添加到现有 Google 地球项目中。
在 Google 地球中打开本地 KML 文件
您可以将旧版 Google 地球中的简单 KML 或 KMZ 文件作为本地 KML 文件打开。如需在 Google 地球中打开本地 KML 文件,请执行以下操作:
- 在 Android 手机或平板电脑上,打开 Google 地球应用
。 - 在主屏幕上选择本地标签页。
- 在右下角,依次点按新建 本地 KML 编辑器。
- 选择打开设备中的 KML/KMZ 文件。
- 如需返回地图并打开文件,请点按 返回。
选择要打开的文件后,该文件会自动存储在主屏幕上的“本地 KML 文件”标签页中。
iOS
将文件导入现有 Google 地球项目
您可以将旧版 Google 地球中的简单 KML 或 KMZ 文件导入到现有 Google 地球项目中。如需将文件导入现有 Google 地球项目,请执行以下操作:
- 在 iPhone 或 iPad 上,打开 Google 地球应用
。 - 在主屏幕上,点按现有项目。
- 依次点按底部的更多 将 KML/KMZ 导入项目。
- 如要添加 Google 云端硬盘中的文件,请点按从云端硬盘导入。
- 如需直接从设备添加文件,请点按从设备上传。
- 选择要导入的文件。
- 如需返回地图并打开文件,请点按 返回。
选择要导入的文件后,该文件会自动添加到现有项目中。
将文件导入新项目
您可以将旧版 Google 地球中的简单 KML 或 KMZ 文件导入到现有项目中。如需将文件导入现有项目,请执行以下操作:
- 在 iPhone 或 iPad 上,打开 Google 地球应用
。 - 点按底部的新建。
- 如要添加 Google 云端硬盘中的文件,请点按将文件从云端硬盘导入项目。
- 如需直接从设备添加文件,请点按将文件从设备导入项目。
- 选择要导入的文件。
- 如需返回地图并打开文件,请点按 返回。
选择要导入的文件后,该文件会自动添加到现有 Google 地球项目中。
在 Google 地球中打开本地 KML 文件
您可以将旧版 Google 地球中的简单 KML 或 KMZ 文件作为本地 KML 文件打开。如需在 Google 地球中打开本地 KML 文件,请执行以下操作:
- 在 iPhone 或 iPad 上,打开 Google 地球应用
。 - 在主屏幕上选择本地标签页。
- 在右下角,依次点按新建 本地 KML 编辑器。
- 选择打开设备中的 KML/KMZ 文件。
- 如需返回地图并打开文件,请点按 返回。
选择要打开的文件后,该文件会自动存储在主屏幕上的“本地 KML 文件”标签页中。