Oracle Spatial Studio focuses on being comprehensive and easy to use so users can concentrate on addressing business-critical requirements instead of trying to figure out how to use the basic tool.
In this blog, We will show you how easy it is to upload shapefiles to Spatial Studio, a no-code web tool for working with the Spatial features of Oracle Database. We will use Spatial Studio with Oracle Autonomous Database. For more information about Spatial Studio, including deployment options to get started, please click here.
Shapefiles are a set of files that stores geographic locations with their associated attributes like polygons, point, and lines. We will use files containing police boundaries and accident information in this scenario. We want to validate whether police stations are in the most optimal locations based on where the most accidents occur.
We have already provisioned an Autonomous Database, created a user for Spatial Studio, and installed Spatial Studio (This workshop helps you execute these steps). We will be going straight into uploading the shapefile.
Uploading a Shapefile to Spatial Studio
Note: We recommend loading the shapefiles (or any other spatial data) into a dedicated schema instead of using the Spatial Studio metadata schema.
2. Then drag and drop the file to the file upload tile or click on the file upload tile and navigate to the file. Click Create. Spatial Studio accepts spreadsheets, shapefiles, GeoJSON, CSV, and KML. You can also have the datasets in a zip file and upload the zip file directly!
3. In the data preview, set the upload to connection as SPATIAL_STUDIO. You may have to change the format of the Table name or Database name if they contain special characters. Then click Submit.
4. When the upload is complete, the dataset will be listed. A warning icon indicating actions need to be taken may appear. Click on the warning icon and then click the link Go to Dataset Columns to assign a key column.
5. Select the attribute you want to use as the key and then click Validate key. In this scenario, COMPNT_NM is the attribute that contains unique values. If your dataset doesn't have an attribute that contains unique values, you can click on the Create Key Column, and a key will be created for you.
After you validate the key, click Apply.
6. Click on the action menu for the dataset you are using and select Create Project.
If needed, you can add more datasets by clicking on the + sign and selecting Add Dataset.
7. Click and drag the datasets you want to display and drop them anywhere on the map.
The dataset will be added as a map layer, and the map will pan and zoom to the area of the data.
Your shapefile is uploaded and displayed on the map!
Want to discuss? Join our public Slack channel to talk to other Oracle developers!
I am a Product Manager for Spatial and Graph. In my free time I enjoy traveling, discovering new restaurants, and going to the beach!