How to get easting & northing of cell in raster using ArcPy?

It might be very simple task. But I would appreciate if someone can comment on How I can get easting and northing of a single cell raster using arcpy as this value is used for in further steps.

-
Do you mean a single cell raster, or a single cell within a raster? If it is a cell within a larger raster, how are you determining/selecting the cell of interest? – Jay Guarneri Oct 30 '12 at 21:59
It is a single cell raster which is basically watershed outlet cell and i just want to determine its coordinates. I think if i convert it to point then i can use "arcpy.AddXY_management" to get easting and northing from attributes. Do you have a better suggestion? – Ibe Oct 30 '12 at 22:05

Exporting to a point file and adding XY should work, and probably be easier than calculating the northing and easting directly from a raster. However, if you absolutely must have the info from the raster, you might try retrieving the x and y extent properties via arcpy.GetRasterProperties_management? Depending on whether the extent of the raster is just the individual cell or if it extends far beyond, this would give you the coordinates of one of the corners. If your raster extent is beyond the cell, then you would have to know what column and row that cell was located at, and use those combined with the cell size and an extent corner to get the northing and easting.

-

hi you could also do something like this

`rast = arcpy.Raster(inrast)

this returns dounbles

ext = rast.extent

Xmax = ext.XMax

Xmin = ext.XMin

YMax = ext.YMax

Ymin = ext.YMin

this returns points

LL = ext.lowerLeft

LR = ext.lowerRight

UL = ext.upperLeft

UR = ext.upperRight`

-
if for example you wanted to get the XY for the center of the cell then use the example above that returns points and create a polygon. Then use poly.centriod to return the center point of the polygon – dango Nov 27 '12 at 7:31