0

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

closed as off-topic by PolyGeo Oct 20 '18 at 10:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    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
  • 1
    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
2

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:

enter image description here

1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.