X

Oracle Spatial and Graph – technical tips, best practices, and news from the product team

Oracle Spatial Studio Supports KML File Upload

Carol Palmer
Senior Principal Product Manager

This guest post is by Honglei Zhu.

The 21.1 release of Spatial Studio supports KML file upload. KML is a file format based on XML for storing geographic data and associated content, and it is an Open Geospatial Consortium (OGC) standard. KML is often used to share data over the Internet for visualization. You can also upload a KMZ file, which is a zipped KML file.

KML file may have zero, one, or many folders. In this release, nested folders are not supported, so folders must all be at the root level. One folder is uploaded into one database table. This folder may only have one type of geometry. If there are no folders, then all valid Placemarks are also uploaded into one database table.

Follow these steps to upload a KML file.

Step 1: Prepare KML file for upload

Certain requirements must be met for a KML upload to Spatial Studio. For example, a dataset can only contain one geometry type, such as Point or Polygon. Details are in the Notes section.

Step 2: Upload KML file

As shown below, click on the KML upload button, then click on the KML file that you want to upload. A dialog menu will open.  A KML file can contain multiple folders, so there may be multiple popup windows.

Step 3: Choose the connection, table name, and dataset name for a dataset

Choose your connection for the dataset upload from the drop-down list. Default values are provided for the table name and dataset name for each folder. You may keep the default names or modify them.

Below is a screenshot of an upload of the first folder of a KML file that contains three folders.

Step 4: Dataset visualization and analysis

After a folder is uploaded, a dataset is created. Right click on the dataset to create a Project. You are now ready to visualize your data and perform spatial analysis!

Notes

Currently KML upload has the following constraints:

  1. Only geometry types such as Point, LineString, Polygon, and MultiGeometry stored in Placemarks are uploaded.
  2. A KML file may have zero, one, or many folders. A folder is imported into a database table and can only have one type of geometry. If there are no folders, then all valid Placemarks are uploaded into a database table.
  3. KML files containing nested folders are not supported in this release.
  4. Only one geometry category is supported per folder. Polygon and MultiPolygon are in the same category, as are LineString and MultiLineString. If there are different categories in the same folder, such as Point and Polygon, then the folder will not be imported, and an error message will be displayed.
  5. There are four geometry types in a KML: Point, LineString, Polygon, and MultiGeometry. The first three types are mapped directly to the same Oracle Spatial types. The last type, MultiGeometry, is mapped as MultiLineString or MultiPolygon type. MultiPoint is currently not supported for uploading.
  6. There are workarounds for the KML upload constraints if you understand XML or KML syntax and are familiar with some basic text file editing. For example, if a KML file has a nested folder, you can create a new KML file that does not have a nested folder. And if a folder contains two types, such as Point and Polygon, then you can create a new KML file that splits the folder into two, each containing only one type.

Additional Information

To learn more about the new features in Spatial Studio 21.1, please see the Release Notes

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.