Summary
Creates a mobile scene package file (.mspk) from one or more scenes for use across the ArcGIS platform.
Usage
Mobile scene packages can be used in ArcGIS Pro and by developers building applications with ArcGIS Runtime SDK. For ArcGIS Runtime SDK, .mspk files were introduced at version 100.5. Mobile scene packages are supported as a file type in ArcGIS Online and Portal for ArcGIS 10.7 and later. See Share a mobile scene package for more information.
Mobile scene packages can be imported into ArcGIS Pro using Import Map on the Insert tab in the Project group.
When creating a mobile scene package, all scenes and data layers will be projected to a common coordinate system. The coordinate system that will be used is the coordinate system of the scene. If there are multiple scenes, the first input scene coordinate system will be used. Faster processing time can be achieved by ensuring that all datasets are in the same coordinate system. Currently, ArcGIS Runtime SDK applications only support global scenes in the WGS84 and Web Mercator Auxiliary Sphere coordinate systems.
If the scene contains service layers, scene layer packages (.slpk file) or tile packages (.tpk file), ensure that their coordinate system matches the scene's coordinate system in the scene properties. Packages that have a coordinate system other than that of the scene will be blocked from the mobile scene package. Both the horizontal (XY) coordinate system and vertical coordinate (Z) system must match the scene's coordinate system. See Specify a coordinate system for detailed steps on updating a scene's coordinate system.
If the scene contains a network layer that references a network dataset, it will be included in the mobile scene package as a transportation network for routing and driving directions. All feature classes and tables that the network references will become part of the mobile scene package. This may include layers that are not part of the scene. For example, if there is only a network layer in the map, the package will include the streets, junctions, and turns feature classes associated with the network. See Author a mobile scene package for ArcGIS Runtime for additional considerations.
You can use the interactive edit tool to define the area of interest by drawing a rectangle on the ground of the scene. If an extent is not specified, the current scene extent will be used to define the area of interest (AOI) and consolidate only those features that intersect that extent. See Area of interest considerations for details.
Mobile scene packages are optimized for 3D visualization, and multipatch feature layers, 3D point feature layers, and LAS dataset layers will be converted to scene layer packages for fast drawing. See Operational layers for more information on how layers are packaged in a mobile scene package.
The following table lists supported input data and how the output data is converted or copied in the mobile scene package. It also lists whether the data can be reprojected to the scene's coordinate system. Datasets that cannot be reprojected will be blocked as input to the Create Mobile Scene Package tool.
Source dataset Dataset in mobile scene package Reprojection of dataset supported 2D Point, Line, or Polygon Feature Layer
SQLite Feature Class
Yes
3D Point Feature Layer
Scene Layer Package
Yes
Multipatch Feature Layer
Scene Layer Package
Yes
LAS Dataset Layer
Scene Layer Package
Yes
Scene Layer Package
Scene Layer Package
No
Raster Layer
Raster Dataset
Yes
Elevation Source
Tile Package or Raster Dataset
Yes for Raster Dataset
Tile Package
Tile Package
No
Network Layer
Transportation Network
Yes
KMZ or KML
KMZ or KML
No
Table
SQLite Table
No
Service Layer
Service Layer
No
Caution:
Scenes that contain large or many datasets may require significant processing time to convert the data for use in the mobile scene package.
Syntax
CreateMobileScenePackage(in_scene, output_file, {in_locator}, {area_of_interest}, {extent}, {clip_features}, {title}, {summary}, {description}, {tags}, {credits}, {use_limitations}, {anonymous_use}, {texture_optimization}, {enable_scene_expiration}, {scene_expiration_type}, {expiration_date}, {expiration_message}, {select_related_rows}, {reference_online_content})
Parameter | Explanation | Data Type |
in_scene [in_scene,...] | One or more local or global scenes that will be packaged into a single .mspk file. Active scenes and .mapx files can be added as input. | Map |
output_file | The output mobile scene package .mspk file. | File |
in_locator [in_locator,...] (Optional) | One or more locators (.loc) that will be included in the mobile scene package. Note:Locators have the following restrictions:
| Address Locator |
area_of_interest (Optional) | A polygon layer that defines the area of interest. Only those features that intersect the area of interest will be included in the mobile scene package. | Feature Layer |
extent (Optional) | Specifies the extent that will be used to select the features that will be included in the mobile scene package. You can specify the extent using a keyword or by entering the coordinates using the format X-Min Y-Min X-Max Y-Max. To use the extent of a specific layer, specify the layer name. The default extent will be the combined extent of all input scenes.
If the area_of_interest parameter is specified, the extent parameter is ignored. | Extent |
clip_features (Optional) | Specifies whether the output features will be clipped to the given area of interest or extent.
Note:Multipatch feature layers, 3D point feature layers, LAS dataset layers, service layers, tile packages, and scene layer packages, cannot be clipped and will be completely copied to the mobile scene package. Specifies whether the output features will be clipped to the given area of interest or extent.
Note:Multipatch feature layers, 3D point feature layers, LAS dataset layers, tile packages, and scene layer packages, cannot be clipped and will be completely copied to the mobile scene package. | Boolean |
title (Optional) | Adds title information to the properties of the package. | String |
summary (Optional) | Adds summary information to the properties of the package. | String |
description (Optional) | Adds description information to the properties of the package. | String |
tags (Optional) | Adds tag information to the properties of the package. Multiple tags can be added, separated by a comma or semicolon. | String |
credits (Optional) | Adds credit information to the properties of the package. | String |
use_limitations (Optional) | Adds use limitations to the properties of the package. | String |
anonymous_use (Optional) | Specifies whether the mobile scenes can be used by anyone or only those with an ArcGIS account.
License:This optional parameter is only available with the Publisher extension. | Boolean |
texture_optimization (Optional) | Specifies the texture optimization that will be used. Textures are optimized according to the target platform where the scene layer package will be used. This parameter applies to scene layer packages only. Caution:Optimizations that include ETC2 may take significant time to process. For fastest results, use Desktop or None.
| String |
enable_scene_expiration (Optional) | Specifies whether the mobile scene package will time out.
License:This optional parameter is only available with the Publisher extension. | Boolean |
scene_expiration_type (Optional) | Specifies the type of scene access for the expired mobile scene package.
License:This optional parameter is only available with the Publisher extension. | String |
expiration_date (Optional) | The date the mobile scene package will expire. License:This optional parameter is only available with the Publisher extension. | Date |
expiration_message (Optional) | A text message will appear when an expired scene is accessed. License:This optional parameter is only available with the Publisher extension. | String |
select_related_rows (Optional) | Specifies whether the specified extent will be applied to related data sources.
| Boolean |
reference_online_content (Optional) | Specifies whether service layers will be referenced in the package.
| Boolean |
Code sample
The following script demonstrates how to use the CreateMobileScenePackage tool in the Python window.
import arcpy
arcpy.env.workspace = r'c:\data'
arcpy.management.CreateMobileScenePackage(
'loma_linda','LomaLindaBuilding.mspk', None, None, 'DEFAULT', 'SELECT',
'Loma Linda Proposed Building',
'Offline mobile scene package for planning department', None, 'mspk', None,
None, 'STANDARD', 'DESKTOP', 'ENABLE_SCENE_EXPIRATION', 'ALLOW_TO_OPEN',
'12/31/2019 9:00:00 AM', 'This scene is expired. Contact admin@email.com',
'EXCLUDE_SERVICE_LAYERS')
The following script demonstrates how to use the CreateMobileScenePackage tool in a Python script.
import arcpy
arcpy.env.workspace = r'c:\data'
arcpy.management.CreateMobileScenePackage(
'Yosemite.mapx','YosemiteOffline.mspk', None, None, 'DEFAULT', 'SELECT',
'YosemiteOfflineScene',
'Offline mobile scene package for Yosemite National Park', None,
'mspk, yosemite, offline', None, None, 'STANDARD', 'DESKTOP',
'DISABLE_SCENE_EXPIRATION', 'ALLOW_TO_OPEN')
Environments
Licensing information
- Basic: Limited
- Standard: Limited
- Advanced: Limited