Ok, well in the sample code you had opened the rasterdataset, that is a good start.If you look at the developer help for Irasterdataset, you will notice this is an interface on the rasterdataset class. So you actually have a rasterdataset object, you are just grabbing it through its IRasterDataset interface. If you look at the rasterdataset class (not interface) you will notice it implements IGeodataset as well as IRasterDataset, and IGeodataset has an extent property. So you need to cast your IRasterDataset variable to an IGeodataset variable.dim geoDs as IGeodataset = directcast(rasterdataset, Igeodataset)Then access the extent property and you have everything you need.
The extent of the rasterinfo is an IEnvelope.Are you using vba or vb.net?RasterInfo might be a little more than what you need. The .net help has an example on how to get it from one of the raster bands.If all you need is the corner coordinates from the rasterdataset, it might be easier to type cast (directcast in vb.net) that to an IGeodataset. IGeodataset has a property called extent which also happens to be of a type IEnvelope. This is all read only of course, editing a raster is whole different thing.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.