# Why is esri grid cell width always constant?

Question asked by djordjes on Oct 15, 2015
Latest reply on Oct 16, 2015 by Dan_Patterson

Dear GeoNet community.

I was wondering if somebody could help me with an issue related with cell width of an esri grid format (.asc file).

What I would like to do is to import an elevation data from an .asc file to Rhino 5 application.

In Rhino 5 I am opening an .asc file with IronPython 2.7, and then generating a terrain model from elevation values.

However, there is one thing that confuses me:

is the width of the cells always constant?

To make it more understandable, here is a small example of how an .asc file looks like:

ncols        38  # number of cells in x direction
nrows        29  # number of cells in y direction
xllcorner    2.140416666625  # bottom,left corner's (origin) longitude
yllcorner    41.350416666671  # bottom,left corner's (origin) latitude
cellsize     0.000833333333  # size of the cell in decimal degrees
NODATA_value -32768  # no elevation value.
36 34 35 33 34 36 32 29 32 35 39 39 41 40 38 41 38 39 37 40 38 38 37 34 ...   # elevation values

I also attached that .asc file bellow. It's an elevation data for Barcelona.

Here is a visual representation of upper mentioned values from .asc file taken from wikipedia (which is copied from ArcGIS help):

I simplify the Earth model to sphere, and assume that one degree of latitude and longitude at equator is 111120 meters.
Then I use the "yllcorner" variable's value (origin's latitude) to calculate the width of the cell size:

cellWidthMeters = cellsize * 111120 * math.cos(yllcorner)

The value of "cellWidthMeters" that I get is the width of the cell at that (yllcorner) latitude. It is also the cell height at any longitude, as this one is constant.

What I do not understand is, why isn't the width of the cells changing, as the latitude is changing? Something like this:

Why is it always constant?

The width of the cell is in degrees of longitude at "yllcorner" latitude.

So the width of the cell should be shrinking as we go further from the origin, because the degree of longitude is shrinking the larger the longitude is.

Or did I get this completely wrong?