Written by George Lienkaemper
February 10, 1998
Since the Avenue programming language is open and available to anyone who wants to take the time to learn it, the large pool of talented ArcView users has spawned a number of innovative software developers. One method of adding tools to the ArcView program is through the development of ArcView Extensions. Extensions developed by ESRI are either included among the sample scripts or licensed and sold - like Spatial Analyst. Other extensions developed by the user community are available for sale or free of charge over the Internet. Today we will make use of both commercial and free extensions. All of them will definitely make ArcView a more useful tool.
Log in as the user workshop and
use the password work0shop. Move to the directory named for the
workstation you're using- at picea cd /data/gisinfo/piceabase; at
myrica cd /data/gisifo/myricabase, etc. Start ArcView with av3.
![]()
XTOOLS
Clipping
This is the function most of us first miss in ArcView. For our example today use Xtools to clip Vegetation (wnfveg) with the Watershed Boundary (wsbound). One point to keep in mind: my experience has been that clipping line themes is a very lengthy process.Identity
![]()
PROJECTOR!
ArcView has always had the capability to display themes from geographic coordinates (Longitude and Latitude expressed in decimal degrees) into many different projections. This is a temporary method of display and the data are not actually transformed. There has been no tool to actually reproject themes between projections. The Projector! Extension adds this capability. Now themes in Albers or Lambert can be projected into new shapefiles in UTM or State Plane. This extension operates on shapefiles. (Note: the default spheroid is GRS1980, the basis for the datum NAD83. If your data need the datum NAD27, you should select a custom projection and choose the Clarke1866 spheroid.)
Other Extensions
You may have noticed other extensions listed
under the File-Extensions menu. These tools facilitate the addition
of several data types to views - autocad .dxf files, jpeg files, and Imagine
.img files; or extend the analytical capability of the software - spatial
analyst, network analyst and hydrology tools; or add some features to map
layout - Maptools. These extensions reside in the $AVHOME/ext directory.
However, you can run extensions that reside in your $HOME directory without
having them installed in $AVHOME. Simply copy the <extension.avx file
into your home directory; arcview looks there for extensions. Here are
a few other extensions that can be found in $AVHOME/arcview3/samples/ext:
avlabel
Title: ArcView Labeling Extension
Topics: Graphics, Views
Description: This extension adds two tool menus to View GUIs, and one tool menu to Layout GUIs. These tools allow you to label individual features with labels that contain additional graphics like leaders, backgrounds, shadows or both. The icons for each tool indicate approximately what the result will be. For View GUIs, there are two toolsbars, the first is for adding text that you must enter in the Text Properties window. The second toolmenu contains tools that will label the feature of the active theme(s) that you click on. For the tools that create leaders, click on the feature you want to label and drag in the direction you want the label to appear.
For a complete description of what each tool does, open an new script editor and use the load system script button to put the script into your script editor. All the scripts in this extension begin with the avlabel.xxxxxx prefix.
Requires: A View and Layout DocGUIs
that contain a tool bar.
last4
Title: Remember Saved Projects
Topics: Projects
Description: This extension provides the "last saved" functionality common on windows applications. It maintains a list of the last four projects saved and allows you to go back to them simply by clicking on the appropriate choice in the Project's File menu.
This extension modifies the system scripts Project.Save, Project.SaveAs, Project.Open and Project.NewPart2. If your project or user default project also modifies any of these scripts, the extension will NOT work properly. The extension saves the last projects to an odb file in your $HOME directory called default.l4.
You might want to make this extension part of your default environment. When you load this extension, hit the Make Default button in the extension dialog.
Requires: A project DocGUI named
"Project".
overview
Title: Overview
Topic: Views
Description: The Overview extension
adds two new choices to the View menu of selected View DocGUIs. These choices
allow you to
create and control an overview views.
The Overview view is a small view that displays the full extent of the
current view and a rectangle outlining
its extent. When you change the display
extent of the current view, the graphic on the overview view changes with
it. If you select the overview view, you can modify the rectangle to change
the display extent of the current view. Whenever you close a view
with an associated overview, the overview closes. When you open a view
with an associated overview, the overview opens. If your overview gets
closed or lost among many other documents, you can restore it to the top
by using the Display Overview choice in the View DocGUI's View menu.
The overview view has a much simplified user interface. It provides controls
to change the extent rectangle and also to delete unwanted themes from
the view.
Requires: This requires at least
one View DocGUI with a menu named View.
portprj
Title: Port Project Utility
Topics: Projects
Description: This extension provides utilities that make it easier to move projects from machine to machine. It installs a menu called Port to the project's DocGUI. This menu has two choices "Replace paths" and "Open projects". Replace paths substitutes environment variables for paths names. First, you select a project file. Then the utility finds all the paths referenced in that project file and their subpaths. You pick the file names that you want to substitute with environment variables. Next, it creates a new version of the project with the revised pathnames and it also creates an ODB file with the paths and associated environment variables. The odb file is named like the new project file with a .env extension. When you open a project with the Project open option, if that project was created by the Replace paths option described above, you are given an opportunity to review and revise the required environment variables. If any environment variables reference non-existent directories, you will be prompted to correct the value. The utility then saves any revisions to the .env file for the next time. If you open a project that has not been created by the Replace paths option, then the extension asks you to identify any associated environment variables andtheir paths. Hit cancel when you have specified all environment variables. It establishes the environment variables and creates an associated .env file.
Requires: Requires a project DocGUI
named Project.
seesmpl
Title: Samples Browser
Topics: Scripts, Misc
Description: This extension allows you to peruse, load and unload extensions in the Samples directory. It installs a choice in the Project's File menu that sets the environment variable $USEREXT to $AVHOME/samples/ext, brings up the Extension dialog and then restores $USEREXT. Use this choice to check out sample extensions and load/unload them to your system.
The extension also adds a choice to the Script menu in the Script DocGUI that allows you to load sample scripts to script editors. The saved names are restored.
Copy this extension from the samples directory to your default $USEREXT directory to simplify access to other sample extensions
Requires: A standard ArcView install
so that the samples are in the directory $AVHOME/samples/ext.
vistools
Title: Visibility tools Extension
Topics: Spatial Analyst
Description: This extension adds two tools to View GUIs. This extension requires the Spatial Analyst be loaded. These tools allow you to generate a profile / line-of-sight diagram and a visibility surface. The profile tool allows you to enter a 2 point line, once you've entered the line the tool calculates the profile of your grid along that line and generates a chart of the profiles, in addition the chart displays red or green sections indicating if the section is in your line of sight. The visibility tool allows you to drag a line indicating where the observer is standing and where they are looking towards. The script then write out the angle of view and generates a visibility grid.
Requires: The Spatial Analyst be loaded and a View DocGUI that contain a tool bar.