Summary
Converts multipatch features to a raster dataset.
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 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 so will not be represented in the output raster.
This tool allows you to burn 3D building features (as multipatches) in an urban space into a Digital Elevation Model (DEM). To accomplish this, first use this tool to convert the multipatch features into 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 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 utilized is limited to 4.
If you wish the tool to use fewer cores, use the parallelProcessingFactor environment setting.
Syntax
MultipatchToRaster_conversion (in_multipatch_features, out_raster, {cell_size})
Parameter | Explanation | Data 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. When not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for an Esri Grid raster format. | Raster Dataset |
cell_size (Optional) | The cell size for the output raster dataset. The default cell size is the shortest of the width or height of the extent of the input feature dataset, in the output spatial reference, divided by 250. | Analysis Cell Size |
Code sample
MultipatchToRaster example 1 (Python window)
This example converts a multipatch shapefile into a raster and saves the output raster in IMG format.
import arcpy
from arcpy import env
env.workspace = "c:/data"
arcpy.MultipatchToRaster_conversion("buildings.shp",
"c:/output/outbuildings.img", 0.25)
MultipatchToRaster example 2 (stand-alone script)
This example converts a multipatch shapefile into 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
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inFeatures = "buildings.shp"
outRaster = "c:/output/outbuildings.tif"
cellSize = 0.5
# Execute MultipatchToRaster
arcpy.MultipatchToRaster_conversion(inFeatures, outRaster, cellSize)
Environments
Licensing information
- ArcGIS for Desktop Basic: Yes
- ArcGIS for Desktop Standard: Yes
- ArcGIS for Desktop Advanced: Yes