|
 |
Back
to GIS and Permit/Use Mapping Development
ArcView II
1. How to Merge Features and Handle Duplication
2. Moving and Rotating Features
3. Responding to Request for Coordinates in Latitude/Longitude
4. At Last! Select All and Switch Selection Buttons for a View
5. Deluxe Selection Tools
6. Smart Link Tool
7. Calculating a Polygon's Acreage
8. Map Tips
9. Polygon-to-Point Conversion
ArcView II
Customizing ArcView to Gain More Functionality
An enormous resource of ArcView related information exists at ESRI's ArcScripts website, where ArcView users can browse and download a wide variety of scripts and extensions written by ESRI personnel and other ArcView users. The following scenarios include the use of a few of these scripts that demonstrate the increased functionality available through customization.
1. How to Merge Features and Handle Duplication
Scenario--At the beginning of a new permitting season, two people take a copy of the previous year's field border layer and begin creating new field sites. Person A works on the northern part of the county and Person B on the southern part. The newly added field sites are identified in the shapefile by the person's initials and the date they were created. How can the two shapefiles be merged without creating duplicate shapes?
Solution 1--Using the Merge feature of the Geoprocessing Extension
-
If the two shapefiles that are to be merged contain the same information, as in this case with the previous year's field borders, the resultant shapefile will contain duplicate shapes.
-
To remove the duplicated shapes, a Duplicate Record Tagger (download self-extracting zip file: dup.zip, zipped size = 4K) developed by Mark Cedarholm searches for duplicate records in a Table document based on user specified field(s). Three scripts are supplied: Table.TagDup should be attached to the Click Property of either a menu choice or a button in the Table GUI; Qsort and CmpRecD are dependent scripts that must reside as the aforementioned scripts within the project. The Duplicate Record Tagger selects the duplicate records in a table, which then could either be removed by deletion (with caution), or the records could be switched to create a new shapefile/table minus the duplicates.
Solution 2--Prior to merging, select the features of each theme to be merged, and use the Merge feature of the Geoprocessing Extension. Merge will only merge the selected features, and if no features are selected, all features will be merged.
Solution 3--Using the Copy Features Extension (download self-extracting zip file: copyfeat_avx.zip, zipped size = 4K) developed by Stephen Lead (ESRI Australia), features from one theme can be selected and copied to another.
-
Load the extension file, then add two or more themes to the view. Use the "Copy" button at the extreme right of the view's button bar.
-
Specify the Source and Target themes in the relevant dialog boxes. Only themes of the same feature type may be used--e.g. if a line theme is chosen for the Source, only line themes will be available in the Target box.
-
Use the "Select" tool to select features from the Source theme to transfer. You may also use standard ArcView selection methods such as a query.
-
The "Copy" button will be enabled when features have been selected--provided that the Target theme may be edited.
-
The theme lists are generated when the dialog is opened--if themes are added to the view after this, they will not be available in the dialog.
-
WARNING!--the 'copied-to' theme will by edited and updated automatically--be sure to have a backup copy of your shapefile!
2. Moving and Rotating Features
Scenario--Often users would like to have greater flexibility and control when editing features. An extension (download self-extracting zip file: copy_move_rotate.zip, zipped size = 26K) developed by personnel at the City of Scottsdale, Arizona, enables users to copy, move and rotate selected shapes within a theme using either specified absolute or relative coordinates, or by clicking and dragging the mouse. The extension loads a new menu and a new tool menu into the View GUI. The menu, called Selected Shapes, allows the user to manipulate selected features by keying-in absolute or relative coordinates. The Tool Menu has three tools that allow the user to copy, move, or rotate selected features interactively using the mouse. A word of warning, changes are made to the existing shapefile and there is no UNDO. Recommendation--Work On a Copy of your Shapefile!
3. Responding to Request for Coordinates in Latitude/Longitude
Scenario--A request has been made for the location of a specific point, but the requestor wants the data in Latitude/Longitude coordinates while you are working in State Plane coordinates. How can you fill this request?
Troy Fontenot from CRA Services, Baton Rouge, Louisiana, has developed a tool (download self-extracting zip file: displaypoint.zip, zipped size = 3K) that calculates the Lat/Long coordinates of a point in a view. Two scripts are supplied, DisplayPoint.Click and DisplayPoint.Apply which are attached to the Click and Apply properties, respectively, of a tool in the View GUI. When using the tool the user is prompted to click on the location in the view and then select the appropriate projection information from the subsequent dialog box. The calculated Lat/Long coordinates are placed on the view as a graphic.
4. At Last! Select All and Switch Selection buttons for a view.
Scenario--How often have you wanted to select all the features in a shapefile and have had to either resort to using the select tool to drag a rectangle around the entire shapefile, or go to the shapefile's attribute table and use the Select All button in the Table GUI?
Ruth Henry Bowers of Magnolia Geographic Services, Inc., Houston, Texas, has provided users with scripts for Select All (download self-extracting zip file: viewselectall_ave.zip, zipped size = 1K) and Switch Selection (download viewswitchsel_ave.zip, zipped size = 1K) buttons in the view GUI, and saved us all a task on our "to do" list.
5. Deluxe Selection Tools
Scenario--Howie Sternberg of the State of Connecticut, Department of Environmental Protection, has developed an extension (download self-extracting zip file: zselectd.zip, zipped size = 46K) containing a suite of over twenty useful selection tools.
-
Features are selected in active themes by drawing points, rectangles, polygons, circles, lines and polylines.
-
Three tool menus allow the user to select features within or intersecting drawn points, rectangles, polygons, circles, lines and polylines; buffered rectangles, polygons, circles, lines and polylines; and rectangle and polygons of user specified dimensions.
-
Make one or more theme active in the view and then use one of the tools to select features.
-
The view's Map Units must be set before using any of the Select Sized or Select Buffered tools.
6. Smart Link Tool
Scenario--Wouldn't it be nice to be able to review linked records, such as those in the PUR, while looking at selected features, such as crop boundaries, in a view? A script (download self-extracting zip file: smartid_ave.zip, zipped size = 1K) developed by an ArcView user can be used to replace the existing script attached to the Apply Property of the Identify tool, resulting in a smarter tool which actually reports the linked data. The Smart Link tool allows the user to click on features of a shapefile, displaying the linked records in the identify box if a linkage between the active shapefile and another table exists.
7. Calculating a Polygon's Acreage
Scenario--How can we quickly compare digitized acreages with those reported on the permit? Rosemary Neal of DPR's Pesticide Enforcement Branch has developed an extension (download self-extracting zip file: plyarea2_avx.zip, zipped size = 3K) which calculates the areas of polygons in acres. The extension adds a tool to the View GUI. When the tool is activated the user clicks on the chosen polygon and the acreage is calculated and reported in the status bar at the bottom of the ArcView window. If the Part B RMPP table is joined to the crop boundary shapefile, the tool will also display the acreage reported on the permit.
Post-Conference Additions
8. Map Tips
A nice extension (download self-extracting zip file: zmaptips.zip, zipped size = 59K) has been developed by Howie Sternberg of the Connecticut State Department of Environmental Protection, which displays the theme label that moves with the mouse pointer in a view. The extension adds a tool menu to the View GUI consisting of four tools, which (1 & 2) map tip single or multiple features of the active theme with the label field, (3) map tip two or more active themes with label fields, and (4) label all active themes with their label field when you click. Click the activated tool in the view to start and stop.
9. Polygon-to-point conversion
A member of the Permit Mapping Developers Group asked to have an extension developed that would convert a polygon shapefile to a point shapefile, where the points represented the centroids of the polygons. The Polygon-to-Point Extension (download self-extracting zip file: p2p1_avx.zip, zipped size = 3K) developed by Rosemary Neal of DPR's Pesticide Enforcement Branch, adds a new menu choice entitled "Convert polygon to point..." to the Theme menu in the View GUI. To use the Polygon-to-Point extension, make sure there is a polygon theme active. If a subset of features has been selected, only those selected features will be converted. If no features are selected the whole shapefile will be converted. The user will be asked to select the field of the polygon shapefile that contains the unique identifier (e.g. ID field), and a new theme will be created which contains the centroid points and all the attributes of the polygon shapefile.
|
 |
 |
|