Skip To Content

Create Mobile Scene Package

Summary

Creates a mobile scene package (.mspk file) 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 MapImport 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 all datasets are in the same coordinate system. Currently, ArcGIS Runtime SDK applications only support global scenes in the WGS84 coordinate system.

  • If the scene contains scene layer packages (.slpk file) or tile packages (.tpk file), ensure 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.

  • ArcGIS Runtime SDK only supports tile packages as elevation sources. Elevation sources that reference a raster dataset, elevation image service or TIN will throw an error after the tool is run. See Create an offline scene for detailed steps on creating tile packages that can be used as elevation sources.

  • 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, current scene extents will be used to define the area of interest (AOI) and consolidate only those features that intersect that extent. See How Intersect works and How Union works for an explanation on intersect and union of polygon inputs, respectively.

  • Mobile scene packages are optimized for 3D visualization; therefore, multipatch feature layers, 3D point feature layers, and LAS dataset layers will be converted to scene layer packages to ensure fast drawing. See What is a scene layer for more information about scene layers. Multipatch, 3D point and LAS dataset layers do not honor the Extent or Area of Interest parameters. Consider creating a selection layer if the data needs to be subset for a 3D point or multipatch feature layer. The Extract LAS tool can be used to subset LAS dataset layers.

  • Mobile scene packages are intended for offline workflows. Esri basemaps and portal services must be removed prior to running the tool.

  • 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 datasetDataset in mobile scene packageReprojection 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 referencing Tile Package

    Tile Package

    No

    Tile Package

    Tile Package

    No

    KMZ or KML

    KMZ or KML

    No

    Table

    SQLite Table

    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_management (in_scene, output_file, {in_locator}, {area_of_interest}, {extent}, {clip_features}, {title}, {summary}, {description}, {tags}, {credits}, {use_limitations}, {anonymous_use}, {texture_optimization})
ParameterExplanationData 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:
  • The locator must be created with ArcGIS 10.0 or later.
  • The locator cannot have an unknown coordinate system.
  • The locator or any participating locator in a composite locator cannot be a geocoding service, including services from ArcGIS Enterprise or ArcGIS Online.
  • The locator cannot contain a custom plug-in in the locator style configuration.
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)

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.

  • MAXOF—Union of inputs
  • MINOF—Intersection of inputs
  • DISPLAY—Same extent as current display
  • <Layer>—Same extent as specified layer

If an area_of_interest 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.

  • Checked—The geometry of the features will be clipped to the given area of interest or extent.
  • Unchecked—Features in the scene will be selected and their geometry will remain unaltered. This is the default.
    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.

Specifies whether the output features will be clipped to the given area of interest or extent.

  • CLIPThe geometry of the features will be clipped to the given area_of_interest or extent.
  • SELECT Features in the map will be selected and their geometry will remain unaltered. This is the default.
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 or 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)

Available with the ArcGIS Publisher extension, specifies whether the mobile scenes can be used by anyone.

  • Checked—Enables anyone with access to the package to use the mobile scene without signing in with an Esri named user account.
  • Unchecked—Anyone with access to the package must be signed in with a named user account to use the mobile scene. This is the default.

Available with the ArcGIS Publisher extension, specifies whether the mobile scenes can be used by anyone.

  • ANONYMOUS_USEEnables anyone with access to the package to use the mobile scene without signing in with an Esri named user account.
  • STANDARDAnyone with access to the package must be signed in with a named user account to use the mobile scene. This is the default.
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.

  • ALLAll texture formats including JPEG, DXT, and ETC2 for use in desktop, web, and mobile can be used.
  • DESKTOPWindows-, Linux-, and Mac-supported textures including JPEG and DXT can be used in ArcGIS Pro client on Windows and ArcGIS Runtime desktop clients on Windows, Linux, and Mac. This is the default.
  • MOBILEAndroid- and iOS-supported textures including JPEG and ETC2 can be used in ArcGIS Runtime mobile applications.
  • NONEJPEG textures can be used in desktop and web platforms.
String

Code sample

CreateMobileScenePackage example (Python window)

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')
CreateMobileScenePackage example 2 (stand-alone script)

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')

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics