Label | Explanation | Data Type |
Input 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 |
Input Locator
(Optional) | One or more locators (.loc file) 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 or clip features.
| 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, and tile packages cannot be clipped and will be completely copied to the mobile scene package. | Boolean |
Title
(Optional) | Title information that will be added to the properties of the package. | String |
Summary (Optional) | Summary information that will be added to the properties of the package. | String |
Description (Optional) | Description information that will be added to the properties of the package. | String |
Tags (Optional) | Tag information that will be added to the properties of the package. Multiple tags can be added, separated by a comma or semicolon. | String |
Credits (Optional) | Credit information that will be added to the properties of the package. | String |
Use Limitations (Optional) | Use limitations that will be added to the properties of the package. | String |
Enable 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 textures that will be optimized according to the target platform where the scene layer package is used. Caution:Optimizations that include KTX2 may take significant time to process. For fastest results, use the Desktop or None options.
| 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 that will be used 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) | The text message that will appear when an expired scene is accessed. License:This optional parameter is only available with the Publisher extension. | String |
Keep only the rows which are related to features within the extent
(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 |
Summary
Creates a mobile scene package file (.mspk) from one or more scenes for use across the ArcGIS system.
Usage
Mobile scene packages can be used in ArcGIS Pro and by developers building applications with ArcGIS Maps SDKs. 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 Maps SDKs applications only support global scenes in the WGS84 and Web Mercator Auxiliary Sphere coordinate systems.
If the scene contains service layers, vector tile packages (.vtpk file), or tile packages (.tpk file), ensure that their coordinate system matches the scene's coordinate system in the scene properties or basemap coordinate system. Packages that have a coordinate system other than that of the scene will be blocked from the mobile scene package. Both the horizontal (x,y) coordinate system and vertical coordinate (z) system must match the scene's coordinate system. See Work with coordinate systems 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 Maps SDKs for additional considerations.
You can use the interactive edit tool to define the area of interest (AOI) 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 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 in mobile scenes 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 in mobile scene package Reprojection of data 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
3D Tiles Layer
3TZ
No
Scene Layer Package
Scene Layer Package
Yes
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.
Parameters
arcpy.management.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})
Name | 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 file) 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 or clip features.
| 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, and tile 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, and tile packages cannot be clipped and will be completely copied to the mobile scene package. | Boolean |
title (Optional) | Title information that will be added to the properties of the package. | String |
summary (Optional) | Summary information that will be added to the properties of the package. | String |
description (Optional) | Description information that will be added to the properties of the package. | String |
tags (Optional) | Tag information that will be added to the properties of the package. Multiple tags can be added, separated by a comma or semicolon. | String |
credits (Optional) | Credit information that will be added to the properties of the package. | String |
use_limitations (Optional) | Use limitations that will be added 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 textures that will be optimized according to the target platform where the scene layer package is used. Caution:Optimizations that include KTX2 may take significant time to process. For fastest results, use the DESKTOP or NONE options.
| 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 that will be used 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) | The text message that 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 function 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 function 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
Special cases
- Parallel Processing Factor
If the Parallel Processing Factor value is empty (blank), the tool will run with a default value of 50 percent (one-half) of the available cores.
Licensing information
- Basic: Limited
- Standard: Limited
- Advanced: Limited