6.2 Accessing Spatial Studio REST API Programmatically
You can programmatically interact with the Spatial Studio REST API endpoints from another application.
A typical use case is to consume a Spatial Studio dataset or analysis, and showing its contents (geometries and attributes) on a map that you are creating either from scratch or in an existing web mapping application (such as a map region inside your Oracle Apex application). To implement this, you must first understand the ways Spatial Studio can serve its datasets for mapping purposes.
Spatial Studio can serve its geometry datasets in two formats - GeoJSON and Vector Tiles, with each format using its own REST endpoint. The endpoint that applies for GeoRaster datasets, returns its contents as image tiles. Table 6-1 summarizes all the relevant REST endpoints Spatial Studio uses to serve the data of the datasets.
Table 6-1 Dataset Format Specific Endpoint
Format | Endpoint |
---|---|
Vector Tiles (for table/view/analysis datasets containing geometry or lat/lon indexed columns) |
https://localhost:4040/spatialstudio/oauth/v1/vt/<DATASET_ID>/<GEOM_COLUMN_NAME>/{z}/{x}/{y}.mvt Ensure to substitute the string
|
GeoJSON (for geometry type datasets) |
|
Image Tiles (for GeoRaster datasets) |
Note that this requires
This is different from the REST endpoints for Vector
Tiles or GeoJSON data, which require the |