A geospatial import End Point is responsible importing geospatial data into the iCM database to improve the performance of the geospatial search End Points.
Namespace
By convention, all geospatial import End Points must be named
For example, the following shows an example of a National Parks import End Point that has been categorised under Environment.
Input Schema
A geospatial import End Point should not require an input parameter schema.
End Point Script
The purpose of a geospatial import End Point is to import GeoJSON data into the iCM database for a particular layer and import region. A common use case is to import an entire geospatial dataset, which may set the import region as the full globe. Importing data against the full globe means that any request to the search End Point of the same layer will always return data from a valid database import. Other use cases may only require smaller import regions.
The import End Points provided as out of the box examples follow the full globe use case, and include the following steps:
- Retrieve the full dataset from the original data source (this could be a 3rd party API, CSV file, iCM article data... anywhere!)
- Convert the original source data to GeoJSON
- Import the data into the iCM database against the layer and the full globe region
Note: As import End Points will commonly be called asynchronously or via a schedule, a specific return schema is not mandated
Take a look at the Geospatial Layer Search Helper documentation, which provides useful functions for developing geospatial import End Points.
Scheduling Imports
It is possible to schedule import End Points to run on a schedule using the Scheduled Tasks in iCM. Care should be taken to ensure a recurring schedule fits with the configured import TTL for each layer, for example if a layer has been configured to hold import data for 7 days, the schedule should be set to run at least every 7 days to ensure there is no loss of search performance.