Amazon SageMaker geospatial Map SDK
You can use Amazon SageMaker geospatial capabilities to visualize maps within the SageMaker geospatial UI as well as
SageMaker notebooks with a geospatial image. These visualizations are supported by
the map visualization library called Foursquare Studio
You can use the APIs provided by the SageMaker geospatial map SDK to visualize your geospatial data, including the input, output, and AoI for EOJ.
Topics
add_dataset API
Adds a raster or vector dataset object to the map.
Request syntax
Request = add_dataset( self, dataset: Union[Dataset, Dict, None] = None, *, auto_create_layers: bool = True, center_map: bool = True, **kwargs: Any, ) -> Optional[Dataset]
Request parameters
The request accepts the following parameters.
Positional arguments
Argument |
Type |
Description |
---|---|---|
|
Union[Dataset, Dict, None] |
Data used to create a dataset, in CSV, JSON, or GeoJSON format (for local datasets) or a UUID string. |
Keyword arguments
Argument |
Type |
Description |
---|---|---|
|
Boolean |
Whether to attempt to create new layers when adding a dataset.
Default value is |
|
Boolean |
Whether to center the map on the created dataset.
Default value is |
|
String |
Unique identifier of the dataset. If you do not provide it, a random ID is generated. |
|
String |
Dataset label which is displayed. |
|
Tuple[float, float, float] |
Color label of the dataset. |
|
Dictionary |
Object containing tileset metadata (for tiled datasets). |
Response
This API returns the Dataset
update_dataset API
Updates an existing dataset's settings.
Request syntax
Request = update_dataset( self, dataset_id: str, values: Union[_DatasetUpdateProps, dict, None] = None, **kwargs: Any, ) -> Dataset
Request parameters
The request accepts the following parameters.
Positional arguments
Argument |
Type |
Description |
---|---|---|
|
String |
The identifier of the dataset to be updated. |
|
Union[_DatasetUpdateProps |
The values to update. |
Keyword arguments
Argument |
Type |
Description |
---|---|---|
|
String |
Dataset label which is displayed. |
|
Color label of the dataset. |
Response
This API returns the updated dataset object for interactive maps,
or None
for non-interactive HTML environments.
add_layer API
Adds a new layer to the map. This function requires at least one valid layer configuration.
Request syntax
Request = add_layer( self, layer: Union[LayerCreationProps, dict, None] = None, **kwargs: Any ) -> Layer
Request parameters
The request accepts the following parameters.
Arguments
Argument |
Type |
Description |
---|---|---|
|
Union[LayerCreationProps |
A set of properties used to create a layer. |
Response
The layer object that was added to the map.
update_layer API
Update an existing layer with given values.
Request syntax
Request = update_layer( self, layer_id: str, values: Union[LayerUpdateProps, dict, None], **kwargs: Any ) -> Layer
Request parameters
The request accepts the following parameters.
Arguments
Positional argument |
Type |
Description |
---|---|---|
|
String |
The ID of the layer to be updated. |
|
Union[LayerUpdateProps |
The values to update. |
Keyword arguments
Argument |
Type |
Description |
---|---|---|
|
The type of layer. |
|
|
String |
Unique identifier of the dataset this layer visualizes. |
|
Dict [string, Optional[string]] |
Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields. |
|
String |
Canonical label of this layer. |
|
Boolean |
Whether the layer is visible or not. |
|
Layer configuration specific to its type. |
Response
Returns the updated layer object.
visualize_eoj_aoi API
Visualize the AoI of the given job ARN.
Request parameters
The request accepts the following parameters.
Arguments
Argument |
Type |
Description |
---|---|---|
|
String |
The ARN of the job. |
|
Dictionary config = { label: <string> custom label of the added AoI layer, default AoI } |
An option to pass layer properties. |
Response
Reference of the added input layer object.
visualize_eoj_input API
Visualize the input of the given EOJ ARN.
Request parameters
The request accepts the following parameters.
Arguments
Argument |
Type |
Description |
---|---|---|
|
String |
The ARN of the job. |
|
Dictionary time_range_filter = { start_date: <string> date in ISO format end_date: <string> date in ISO format } |
An option to provide the start and end time. Defaults to the raster data collection search start and end date. |
|
Dictionary config = { label: <string> custom label of the added output layer, default Input } |
An option to pass layer properties. |
Response
Reference of the added input layer object.
visualize_eoj_output API
Visualize the output of the given EOJ ARN.
Request parameters
The request accepts the following parameters.
Arguments
Argument |
Type |
Description |
---|---|---|
|
String |
The ARN of the job. |
|
Dictionary time_range_filter = { start_date: <string> date in ISO format end_date: <string> date in ISO format } |
An option to provide the start and end time. Defaults to the raster data collection search start and end date. |
|
Dictionary config = { label: <string> custom label of the added output layer, default Output preset: <string> singleBand or trueColor, band_name: <string>, only required for 'singleBand' preset. Allowed bands for a EOJ } |
An option to pass layer properties. |
Response
Reference of the added output Layer object.
To learn more about visualizing your geospatial data, refer to Visualization Using Amazon SageMaker geospatial.