Create 3D Object Scene Layer Package (Data Management)

Summary

Creates a scene layer package (.slpk file) from a multipatch or 3D object feature layer input.

Usage

  • To use a multipatch or 3D object feature class as input, you must first add the feature class to an active global or local scene as a feature layer. The feature layer can then be used as input to the tool. A layer file (.lyrx) can also be used as input.

  • The output coordinate system should match the spatial reference of the web scene in which it will be displayed. If the intended display environment will be a global web scene, the output coordinate system must use GCS WGS 84 or China Geodetic Coordinate System 2000.

  • Consider the following when defining z-coordinates in the 3D data being processed:

    • If the output scene layer package will have x,y coordinates in GCS WGS 84, the z-coordinate system can be defined using any ellipsoidal datum or EGM96 or EGM2008 through the Output Coordinate System parameter. If the z-coordinate system is undefined, the vertical units will be meters.
    • If the output scene layer package will store x,y values in projected coordinates and the z-coordinate system is not defined, the vertical units will be the same as the x,y coordinates. For 3D features with undefined z-units that differ from the x,y units, you can use either the Adjust 3D Z tool to convert z-values to a matching linear unit or the Define Projection tool to define the correct z-datum.

  • The elevation of multipatch layers must be defined with absolute heights.

  • Only the fields designated as visible in the layer properties will be preserved in the scene layer package. If certain fields are not needed in the resulting scene layer, you can hide the unwanted columns.

Parameters

LabelExplanationData Type
Input Dataset

The input multipatch or 3D object feature layer.

Layer File; Feature Layer
Output Scene Layer Package

The output scene layer package (.slpk).

File
Output Coordinate System
(Optional)

The coordinate system of the output scene layer package. It can be any projected or custom coordinate system. Supported geographic coordinate systems include WGS 1984 and China Geodetic Coordinate System 2000. WGS 1984 and EGM96 Geoid are the default horizontal and vertical coordinate systems, respectively. The coordinate system can be specified in any of the following ways:

  • Specify the path to a .prj file.
  • Reference a dataset with the desired coordinate system.
  • Use an arcpy.SpatialReference object.

Spatial Reference
Geographic Transformation

The datum transformation method that will be used when the input layer's coordinate system uses a datum that differs from the output coordinate system. All transformations are bidirectional, regardless of the direction implied by their names. For example, NAD_1927_to_WGS_1984_3 will work correctly even if the datum conversion is from WGS 1984 to NAD 1927.

Note:

The ArcGIS Coordinate System data is required for vertical datum transformations between ellipsoidal and gravity-related and two gravity-related datums.

String
Texture Optimization
(Optional)

Specifies the textures that will be optimized according to the target platform where the scene layer package is used.Optimizations that include ETC2 may take significant time to process. For fastest results, use the Desktop or None options.

  • All —All texture formats will be optimized including JPEG, DXT, and ETC2 for use in desktop, web, and mobile platforms.
  • Desktop —Windows, Linux, and Mac supported textures will be optimized including JPEG and DXT for use in ArcGIS Pro clients on Windows and ArcGIS Runtime desktop clients on Windows, Linux, and Mac. This is the default.
  • Mobile —Android and iOS supported textures will be optimized including JPEG and ETC2 for use in ArcGIS Runtime mobile applications.
  • None —JPEG textures will be optimized for use in desktop and web platforms.
String

arcpy.management.Create3DObjectSceneLayerPackage(in_dataset, out_slpk, {out_coor_system}, transform_method, {texture_optimization})
NameExplanationData Type
in_dataset

The input multipatch or 3D object feature layer.

Layer File; Feature Layer
out_slpk

The output scene layer package (.slpk).

File
out_coor_system
(Optional)

The coordinate system of the output scene layer package. It can be any projected or custom coordinate system. Supported geographic coordinate systems include WGS 1984 and China Geodetic Coordinate System 2000. WGS 1984 and EGM96 Geoid are the default horizontal and vertical coordinate systems, respectively. The coordinate system can be specified in any of the following ways:

  • Specify the path to a .prj file.
  • Reference a dataset with the desired coordinate system.
  • Use an arcpy.SpatialReference object.

Spatial Reference
transform_method
[transform_method,...]

The datum transformation method that will be used when the input layer's coordinate system uses a datum that differs from the output coordinate system. All transformations are bidirectional, regardless of the direction implied by their names. For example, NAD_1927_to_WGS_1984_3 will work correctly even if the datum conversion is from WGS 1984 to NAD 1927.

Note:

The ArcGIS Coordinate System data is required for vertical datum transformations between ellipsoidal and gravity-related and two gravity-related datums.

String
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 ETC2 may take significant time to process. For fastest results, use the DESKTOP or NONE options.

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

Code sample

Create3DObjectSceneLayerPackage example (Python window)

The following script demonstrates how to use the Create3DObjectSceneLayerPackage function in the Python window.

import arcpy
arcpy.management.Create3DObjectSceneLayerPackage(r'c:\temp\buildings.lyrx',
                                                 r'c:\temp\output.slpk',
                                                 arcpy.SpatialReference(4326), None, 'DESKTOP')

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics