Select to view content in your preferred language

Can you define the angle of grid cells in a raster?

4209
6
11-13-2014 03:24 PM
MorganHarris
Occasional Contributor

Is there any way to change the angle of grid cells in a raster layer? I am trying to perform focal statistics to create a raster with the maximum value represented in "bands" that are a grid cell wide, but when the raster angle is not N S E W, but is somewhere in between instead then I cannot create those "bands". This is a confusing problem so I have attached some pictures just for representation of the problem. Picture 1 is how I want to run the focal statistics. Picture 2 is a "real life" situation where the grid does not work for my statistics.

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

convert to an esri grid first

0 Kudos
MorganHarris
Occasional Contributor

What exactly is an esri grid? My raster layers are floating point rasters that were generated within ArcMap. They should be ESRI grids, correct? If they are already in the correct format then what is the next step to be able to define the angle of the grid cells within the raster?

Thanks!

0 Kudos
XanderBakker
Esri Esteemed Contributor

The raster cells are always oriented horizontally and vertically (since they are always rows and columns). The may display rotated if the projection of your data frame is different from the projection of your raster.

In ArcMap you can create different formats of data. An Esri grid is normally the result when writing to a folder. A geodatabase raster is the result if you write to a (file)geodatabase. If you use the default geodatabase as output location you will be created rasters inside a file geodatabase.

If the focal statistics does not work for you, you may consider creating polygons for the neighborhoods you want to use and do a zonal statistics instead.

Kind regards, Xander

MorganHarris
Occasional Contributor

Thank you, that was some useful information. I was pretty sure that the angle of the grid cells couldn't be changed to a specified direction, but I just wanted to see if anyone knew a trick that I didn't.

I will try to create polygons and see if I can solve my problem that way. Thanks!

0 Kudos
curtvprice
MVP Esteemed Contributor

> I was pretty sure that the angle of the grid cells couldn't be changed to a specified direction, but I just wanted to see if anyone knew a trick that I didn't.

As Xander said: the grid cells are not at an angle! Those rasters are being created in a coordinate system different from your ArcMap data frame, and they are being projected on the fly - the grid cells are being displayed rotated, but they are still "straight up" in their native coordinate system.

If you want the rasters in that coordinate system (which probably makes sense, as raster statistics often depend on area) you should either regenerate them with the output coordinate system environment set to the coordinate system you want - or project your rasters using the Project Raster tool before you run the stats.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Right-click inside the data frame...select Properties ... somewhere about 2/3s down, there is a Rotation line ... is it set to something other than 0? if so, set it to 0

See the data frame properties link in the help files

0 Kudos