I like using ArcGIS Table Based Image Catalogs when working with large numbers of rasters in ArcMap. The old style table based Image Catalogs work for clients that still have ArcGIS 8.x or even ArcView 3.x. While a TileCache/Mapserver WMS image server is faster, it is sometimes not a real option for certain clients & situations.
However, lately I’ve been running into a number of situations in which the Image Catalog creator scripts that I’ve always used : USGS Image Catalog Builder or This One aren’t working. On Vista, the user extensions won’t even register and thus are of no use. I’ve also had troubles with large numbers of the newest MrSID type imagery giving "Automation Error" errors & the script stops working.
So I needed another way to create image catalogs that was easy and wouldn’t require me installing additional software on clients’ computers, etc.. While, I could have used Python or some other script, I wanted something that people without any scripting or coding experience could also do.
Software Used:
- FWTools (with a few environment variables modified in the startup batch file so that it would run properly from a stick)
- PSPad
Steps:
- Open FWTools Command Line
- Run gdaltindex on the folder containing the imagery.
gdaltindex naip_05_index.shp 2005_NAIP_NC\*.sid
- Use ogr2ogr to create a BNA format file from the tile index shapefile created in the previous step.
ogr2ogr -f BNA naip05index.txt naip_05_index.shp
This gives you a file with this sample output:
"2005_NAIP_NC\e2997_01_1.sid","",5
596140.0000000000,3319570.0000000000
602854.0000000000,3319570.0000000000
602854.0000000000,3311970.0000000000
596140.0000000000,3311970.0000000000
596140.0000000000,3319570.0000000000
- Open the file with PSPad
- Record a macro in PSPad that flattens this to a single line.
- Go to Tools->Macros->Marco Manager and select "Run X Times" and have it run for as many files as you created the tile index from.
- Final step is to label the columns correctly
- You need to add IMAGE, XMIN, YMIN, XMAX, & YMAX column headers
- The 2nd coordinate group is the XMAX/YMAX group & the 2nd to last (4th) coordinate group is the XMIN/YMIN group.
- You can call the other columns whatever you want, they will be ignored. However you MUST label them or delete them. I use:
IMAGE,A,B,C,D,XMAX,YMAX,E,F,XMIN,YMIN,G,H
THAT’S IT!
Now you have a CSV based text file table that you can use as an Image Catalog.
The only additional step you may need to take is to convert it to a DBF file to work properly on older versions of ArcGIS or ArcView. This can easily be accomplished in the ArcCatalog, ArcToolbox or by loading the table into a map and exporting it to a DBF. Alternatively you can just use Excel, Open Office, or DBF Explorer to convert it as well.
It actually took me much longer to write this post then it did for me to create several image catalogs this way.
Recent Comments