Multipatch to Raster (Conversion)

Summary

Converts multipatch features to a raster dataset.

Illustration

Multipatch to Raster tool illustration

Usage

  • The output raster stores the z-values of the input multipatch features at each cell center location. To determine the z-value for each cell, a vertical line is extended from the cell center location to intersect the input multipatch features. The maximum or minimum z-value from the points of intersection is assigned to the output raster. An output cell will receive a value if the cell center falls within the footprint of one or more input multipatch features; otherwise, it will be assigned NoData.

  • Vertical triangles—essentially vertical walls without a roof—are excluded from the rasterization and will not be represented in the output raster.

  • The Output cell size can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn’t been explicitly specified as the parameter value, it is derived from the environment Cell Size, if it has been specified. If neither the parameter cell size nor the environment cell size has been specified, but the environment Snap Raster has been set, the cell size of the snap raster is used. If nothing has been specified, the cell size is calculated from the shorter of the width or height of the extent divided by 250, where the extent is in the Output Coordinate System specified in the environment.

  • If the cell size has been specified using a numeric value, the tool will use it directly for the output raster.

    If the cell size has been specified using a raster dataset, the parameter will show the path of the raster dataset instead of the cell size value. The cell size of that raster dataset will be used directly in the analysis, provided the spatial reference of the dataset is the same as the output spatial reference. If the spatial reference of the dataset is different, it will be projected based on the selected Cell Size Projection Method.

  • This tool allows you to use 3D building features (as multipatches) in an urban space to build a digital elevation model (DEM). To accomplish this, first use this tool to convert the multipatch features to a raster. Then use the Mosaic tool to mosaic the buildings raster with the DEM raster. With the resulting elevation raster, you can run other tools that operate on raster data to solve analysis problems in an urban space. For example, you can run the Viewshed tool to calculate the visibility, or use the solar radiation tools to calculate the rooftop solar energy potential for the buildings in an urban environment.

  • By default, this tool will take advantage of multicore processors. The maximum number of cores that can be used is four.

    To use fewer cores, use the Parallel Processing Factor environment setting.

Parameters

LabelExplanationData Type
Input multipatch features

The input multipatch features to be converted to a raster.

Feature Layer
Output raster

The output raster dataset to be created.

It will be of floating point type.

If the output raster will not be saved to a geodatabase, specify .tif for TIFF file format, .CRF for CRF file format, .img for ERDAS IMAGINE file format, or no extension for Esri Grid raster format.

Raster Dataset
Output cell size
(Optional)

The cell size of the output raster being created.

This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn’t been explicitly specified as the parameter value, the environment cell size value is used, if specified; otherwise, additional rules are used to calculate it from the other inputs. See Usages for more detail.

Analysis Cell Size
Cell assignment method
(Optional)

Specifies whether the maximum or minimum z-value will be used for a cell when more than one z-value is detected at the cell center location when a vertical line is extended from the cell center location to intersect the input multipatch feature.

  • Maximum heightThe maximum z-value will be assigned to the cell. This is the default.
  • Minimum heightThe minimum z-value will be assigned to the cell.
String

arcpy.conversion.MultipatchToRaster(in_multipatch_features, out_raster, {cell_size}, {cell_assignment_method})
NameExplanationData Type
in_multipatch_features

The input multipatch features to be converted to a raster.

Feature Layer
out_raster

The output raster dataset to be created.

It will be of floating point type.

If the output raster will not be saved to a geodatabase, specify .tif for TIFF file format, .CRF for CRF file format, .img for ERDAS IMAGINE file format, or no extension for Esri Grid raster format.

Raster Dataset
cell_size
(Optional)

The cell size of the output raster being created.

This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn’t been explicitly specified as the parameter value, the environment cell size value is used, if specified; otherwise, additional rules are used to calculate it from the other inputs. See Usages for more detail.

Analysis Cell Size
cell_assignment_method
(Optional)

Specifies whether the maximum or minimum z-value will be used for a cell when more than one z-value is detected at the cell center location when a vertical line is extended from the cell center location to intersect the input multipatch feature.

  • MAXIMUM_HEIGHTThe maximum z-value will be assigned to the cell. This is the default.
  • MINIMUM_HEIGHTThe minimum z-value will be assigned to the cell.
String

Code sample

MultipatchToRaster example 1 (Python window)

This example converts a multipatch shapefile to a raster and saves the output raster in IMG format.

import arcpy
arcpy.env.workspace = "c:/data"
arcpy.conversion.MultipatchToRaster("buildings.shp",
                                    "c:/output/outbuildings.img", 0.25)
MultipatchToRaster example 2 (stand-alone script)

This example converts a multipatch shapefile to a raster and saves the output raster in TIFF format.

# Name: MultipatchToRaster_Ex_02.py
# Description: Converts multipatch features to a raster dataset.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "c:/data"

# Set local variables
inFeatures = "buildings.shp"
outRaster = "c:/output/outbuildings.tif"
cellSize = 0.5

# Run MultipatchToRaster
arcpy.conversion.MultipatchToRaster(inFeatures, outRaster, cellSize)

Licensing information

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

Related topics