Multipatch to Raster (Conversion)
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.
By default, this tool will take advantage of multi-core 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
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. 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
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)
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)