Create An Index Polygon Shapefile For Rasters

Created:6/25/2003
Description:

This sample creates an index polygon shapefile for rasters within a directory. The resulting shapefile contains one polygon per raster extent with the following attributes: ImageName, Fullpath and Image extent.

How to use:
  1. In ArcCatalog, open the customize dialog, select the 'toolbars' tab and check 'context menus'.
  2. Select the commands tab and click 'add from file', browse to and select ImageToPolygon.dll in the open dialog.
  3. From the 'Developer Samples' commands category, add the 'Create Raster Index Polys' command to the 'Folder Context Menu'. Close the customize dialog.
  4. Right click on the folder where raster images are located, and click 'Create Raster Index Polys'.
  5. Select the images and specify the shapefile name, click OK. An index polygon shapefile will be created in the current folder.

Application:
ArcMap

Minimum ArcGIS Version Required: 8.3

Difficulty: Intermediate


Visual Basic
File Description
CreateRasterIndex.cls Create Raster Index Polygon class.
RasterIndexPolys.vbp Visual Basic 6 project file.
frmImages.frm Form to select raster and specify shapefile name.
RasterIndexPolys.dll The compiled dll.


Key CoClasses: RasterWorkspaceFactory, ShapefileWorkspaceFactory
Key Interfaces: IGxObject, IRasterDataset, IGxDataset, IRasterProps, IEnvelope, IPointCollection, IFieldsEdit, IWorkspaceFactory