Geographic Information Services Division Logo

Pima County Department of Transportation

Geographic Information Services Division

Developing GIS data for the Web

Making GIF (raster) files from ARC/INFO

GIF files (along with JPEG files) can be browsed natively by all web browsers, Netscape, Mosaic, Internet Explorer, etc. No plug-ins or other changes are required by the end user. This and relatively small size is GIF's big advantage. The disadvantage is that being a raster image, pan and zoom is not possible without unacceptable loss of detail.

The current Version 7 ARC/INFO cannot generate GIF files directly. ESRI is planning this capability for a future release. For now, the best way to get a GIF file from ARC/INFO is to use ArcPLOT to generate a GRA plot file, DRAW that file on the screen, and then use a screen capture tool such as xv to grab the selected image and write the GIF file.

Optimizing maps for web viewing as GIF files

Problems we've solved

Manual procedure for using xv to capture ARC/INFO images as GIF files

Automated command line capture of ARC/INFO images as GIF files

The xv process above is a manual process. It works great and provides precise control.

It is nice to have an automated way to generate GIF files so they can be generated automatically each time a coverage changes or for generating large numbers of GIF files. This requires a command line interface to the conversion process. There are several options for doing this:

ImageMagick

An alternative suggested by Scott Kreiter is to use the free package ImageMagick as a file coverter. ImageMagick has a number of command tools. See the online command documentation or the program's Unix man pages. Frank Chang, e-mail address, explains how to use ImageMagick's convert command to make a GIF file:

Use "screensave" in arcplot to save the ArcPlot stuff to Sun raster file format. Then you can use "convert" from ImageMagick to port it to GIF format. This way you can include all of these into your aml:

ap
display 9999
mape xxxx
shadeset xxxx
polygonsh xxxx
xxxx plot stuff
...
screensave filename.ras
quit
&sys convert filename.ras filename.gif

The desired output type is more explicit with gif: in front of the output file name like this:

convert filename.ras gif:filename.gif

"gif" tells the convert command to make a GIF 89a formatted file. Some programs can't handle GIF 89a format and need GIF 87a instead. If you need GIF 87a format, use "gif87" in the convert command:

convert filename.ras gif87:filename.gif

You can have your image processed on the web with ImageMagick provided you can specify a web location (URL) where it can be found.

NETPBM (formerly PBMPLUS)

A query by Bruce Hunt on the ESRI-L Listserver resulted in the following:

Most everyone who responded suggested using NETPBM (formerly PBMPLUS), to batch convert numerous Sunraster files to GIF for internet use. Here's a list of sources for NETPBM. NETPBM handles these file formats. See the manual pages for the NETPBM commands. Other suggestions included UNIX power tools, which also contains the "rasttopnm" and "ppmtogif" utilities.

ARC/INFO Plotter Driver

Another alternative was provided by Prashant Bhandary, who has written a plotter driver to accomplish the file conversion in batch mode from a GRA to GIF. It can also make a GIF file directly in ArcPlot. The plotter driver source used to be at ftp://ftp.blm.gov/pub/gis/rtagif.tar.Z. This address is no longer valid and we haven't been able to find a current address. You need the rtagif.tar.Z file and: