Let's suppose you have a raster dataset (in a folder or in a personal database). How can you detect what map scale it represents (assuming of course that all rasters have same dimensions/resolution)?
Mind you, I want to have this info WITHOUT having to show the rasters on the map before.
EDIT:
Based on Matthew Snape's post, I have come to the following code that works satisfactory. The only thing that I have still hard time to get is the raster's dpi. Is there any hope to find this information embedded somewhere in the db?
public void GetDatasetMapScale(string datasetPath, out double scale)
{
var _gp = new Geoprocessor();
_gp.SetEnvironmentValue("workspace", datasetPath);
var rasters = _gp.ListRasters("", "");
var raster = rasters.Next(); // get first raster from dataset
object dt = "";
var rasterElement = (IDERasterBand) _gp.GetDataElement(raster, ref dt);
var meanCellHeight = rasterElement.MeanCellHeight;
var meanCellWidth = rasterElement.MeanCellWidth;
var myCellSize = (meanCellHeight + meanCellWidth) / 2;
var dpi = 300; **// HOW CAN DETECT THIS?????**
var METERS_PER_INCH = 0.0254;
scale = (dpi * myCellSize) / METERS_PER_INCH;
}
Thanks in advance