# TIN to Raster - specify raster's origin [closed]

How could I specify raster's origin, while using arcpy.TinRaster_3d?

• Welcome to GIS SE! Could you please edit your question to include as much relevant information as possible (eg. explain what you already tried, what problems you experienced etc) – Joseph Aug 25 '14 at 11:25
• Arc's help says "you can specify the output raster's origin, extent, and resolution or cell spacing to create a raster covering only a portion of the TIN" but fails to say how to specify any of those besides resolution. – Erica Aug 25 '14 at 12:48

You can define the origin as the Xmin, Ymin (or Left & Bottom) of the extent environment setting. Click the Environment button at the bottom of the tool's interface, click Processing Extent and fill in the extent properties. You have to indicate Xmax & Ymax (Right, Top) as well:

If you are trying to match an existing raster in ArcPy you set the extent to that raster and it's also a good idea to set the snapRaster as well:

import arcpy

InRaster = "c:\\some\\path\\to\\raster.tif"

DescObj = arcpy.Describe(InRaster)
arcpy.env.extent = DescObj.extent # match the extent of the input raster
arcpy.env.snapRaster = InRaster   # match the edges of the raster


Note that this method of setting the extent works with any feature or raster data but the value of the snap raster must be a raster.

Extents of data can include a healthy buffer around the data so setting the output extent alone is good but specifying a snap raster is better!

The snapRaster ensures that the cells of the raster align at the origin; if the cell size is the same then the rasters will perfectly overlay. When using snapRaster you will get the most use if the raster to be produced is either the same, a factor of or a multiple of the snap rasters' cell size.