CreateLocationDateClusteringTask
Creates a spatiotemporal clustering task. It classifies files such as images and videos that are indexed in a dataset and contain capture time and location information based on time and geographic location. These clusters can represent content captured during a trip or at different living and working places. By analyzing the locations and time ranges of these clusters, you can classify and select media files, and generate photo and video stories.
Operation description
-
Before you call this operation, make sure that you fully understand the billing methods and pricing of Intelligent Media Management.
Important The completion time of asynchronous tasks is not guaranteed. -
Before you call this operation, make sure that you have indexed files into a dataset by using the binding method (CreateBinding) or the active indexing method (IndexFileMeta or BatchIndexFileMeta).
-
Each time you call this operation, the files in the dataset are processed incrementally. You can call this operation on a regular basis to process new files based on the newly added files.
-
After the clustering is complete, you can call the QueryLocationDateClusters operation to obtain the clustering results.
-
Deleting files from a dataset does not change the spatiotemporal clusters. To delete existing spatiotemporal clusters, call the DeleteLocationDateCluster operation.
-
This operation is asynchronous. After the task starts, the task information is retained for only 7 days. You cannot obtain the task information after 7 days. Call the GetTask or ListTasks operation to obtain the returned TaskId and view the task information. You can also set the Notification parameter to obtain the task information through message notifications.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:CreateLocationDateClusteringTask |
create |
*Dataset
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The name of the project. For more information about how to obtain the project name, see Create a project. |
test-project |
| DatasetName |
string |
Yes |
The name of the dataset. For more information about how to obtain the dataset name, see Create a dataset. |
test-dataset |
| UserData |
string |
No |
The custom user information. This information is returned in asynchronous message notifications to help you associate and process message notifications in your system. The maximum length is 2,048 bytes. |
test-data |
| Tags |
object |
No |
The custom tags used to search for and filter asynchronous tasks. |
{ "User": "Jane" } |
| DateOptions |
object |
Yes |
The date clustering settings. Important Adjusting these settings also affects existing spatiotemporal clusters in your dataset. |
|
| GapDays |
integer |
Yes |
The maximum allowed interval in days within a single spatiotemporal cluster. Valid values: 0 to 99999. For example, a user has photos taken on March 4 to 5 and March 7, but no photos on March 6. If you assume that March 4 to 7 should belong to the same trip, set this field to 1. This allows a 1-day gap such as March 6 to be classified into the same spatiotemporal cluster. Recommended values: 0 to 3. |
1 |
| MinDays |
integer |
Yes |
The minimum number of days contained in a single spatiotemporal cluster. Valid values: 1 to 99999. Clusters with fewer days than this value are not detected or stored. For example, if you do not want the generated clusters to include one-day trips, set this parameter to 2. |
1 |
| MaxDays |
integer |
Yes |
The maximum number of days contained in a single spatiotemporal cluster. Valid values: 1 to 99999. Clusters with more days than this value are not detected or stored. For example, if a user takes photos in a place for more than 15 consecutive days, the place is likely a residence rather than a travel destination. If you do not want this period and location to be included in the spatiotemporal clusters, set this parameter to 15. |
15 |
| LocationOptions |
object |
Yes |
The location clustering settings. Important Adjusting these settings also affects existing spatiotemporal clusters in your dataset. |
|
| LocationDateClusterLevels |
array |
Yes |
The list of administrative levels for clustering. Multiple values are supported. For example, a user uploads photos taken in Hangzhou from March 3 to March 5 and photos taken in Jiaxing from March 6 to March 8. If this parameter is set to
|
|
|
string |
Yes |
The administrative level for clustering. Valid values:
|
province |
|
| Notification | Notification |
No |
The message notification configuration. For more information, see Notification. For more information about the format of asynchronous notification messages, see Asynchronous notification message format. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The spatiotemporal clustering task information. |
||
| RequestId |
string |
The request ID. |
B121940C-9794-4EE3-8D6E-F8EC525F**** |
| TaskId |
string |
The task ID. |
LocationDateClustering-c10dce07-1de7-4da7-abee-1a3aba7**** |
| EventId |
string |
The event ID. |
25B-1W2ChgujA3Q8MbBY6mSp2mh**** |
Examples
Success response
JSON format
{
"RequestId": "B121940C-9794-4EE3-8D6E-F8EC525F****",
"TaskId": "LocationDateClustering-c10dce07-1de7-4da7-abee-1a3aba7****",
"EventId": "25B-1W2ChgujA3Q8MbBY6mSp2mh****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.