Вы находитесь на странице: 1из 83

% 03, 8 8 9038 43

'078 43  

Copyright 1998-2000, SWEGIS. All rights reserved.

2 Contents
OVERVIEW BUFFER DISTANCE NEAR CLIP ERASE COVER UPDATE DISSOLVE ELIMINATE EXPLODE GENERALIZE MAPJOIN SPLIT INTERSECT IDENTITY UNION GRAPHICTOSHAPE SHAPETOGRAPHIC CONVERTSHAPE MAKEGRID MOVEXY ROTATE CALCULATECENTER THIESSEN TIN CONTOUR BUTTONBAR CONFIGURE THE ANALYSIS EXTENSION ARCZOOM CONFIGURE ARCZOOM FILEMANAGER DEVELOP TROUBLESHOOTING 3 5 11 15 19 23 25 27 29 31 33 35 39 41 45 51 53 55 57 61 63 65 67 69 71 73 75 75 77 78 78 79 83

Copyright 1998-2000, SWEGIS. All rights reserved.

3
OVERVIEW
This extension provides ArcView GIS with some extra analysis tools. These tools give ArcView GIS the power to perform advanced analysis that before never was possible. Since ArcView GIS wasn't created to perform these analysis will some of the operations run quite slow on too large data sets. The tools can be reached from three different places; a menu called Analysis Extension, the standard buttonbar or a floating buttonbar. The user can self configure where the different tools shall appear. Read more about this under the configure section. The tools are as follows. Buffer Distance - Buffers selected features. - Calculates distance/bearing from features in one theme to features in another theme. - Calculates the distance/bearing from each feature in one theme to the nearest feature in another theme. - Clips one theme using another theme. - Erases features from one theme using another theme. - Updates one polygon theme with polygons from another theme. - Removes borders between polygons that share the same attributes in one or more fields. - Merges selected polygons with neighboring polygons by dropping the longest shared border between them. - Explodes lines or polygons. - Generalizes or cleans lines or polygons. - Copies shapes from several themes into a new theme. - Splits one theme into several new themes. - Overlays two themes and preserves only those feature that falls within the intersection of the extents of the two themes. - Overlays two themes and preserves only those features that fall within the first theme's extent. - Overlays two polygon themes and preserves all features from both themes. - Converts graphics to a shapefile. - Converts a shapefile to graphics. - Convert a shapefile to a shapefile of a different kind. - Makes a mesh based on user input. - Moves a theme with a user defined distance. - Rotates a theme or a shape.

Near

Clip EraseCover Update

Dissolve

Eliminate

Explode Generalize MapJoin Split Intersect

Identity

Union

GraphicToShape ShapeToGraphic ConvertShape MakeGrid MoveXY RotateShape

Copyright 1998-2000, SWEGIS. All rights reserved.

4
CalculateCenter Contour/ISO-line Thiessen/Voronoi TIN/Delaunay - Calculates weighted-/geographic- center, or centroids of a theme. - Calculates contours from a point theme. - Creates Thiessen/Voronoi polygons from a point theme. - Makes a TIN from a point theme.

These operations will work on all feature themes (ARC/INFO coverage, shape-file, CAD drawings etc.). Some of the operations prefer themes with a correct ARC/INFO topology (no overlapping polygons etc.). For further information about this, please see the specific commands.

Further does the extension provide ArcView GIS with some extra zoom tools. These tools enable the user to save zooms-areas and easily return to the same position later. Read more about this under the ArcZoom section.
ArcView and ARC/INFO are registered trademarks of ESRI, Inc

This software is developed by SWEGIS. For information, updates etc. go to www.swegis.com. Address SWEGIS vre Bursliden 9 413 17 Gteborg SWEDEN Telephone +46 (0) 31-7085652 FAX +46 (0) 31-7085653 Org. no. 7503125556 VAT no. 7503125556

Copyright 1998-2000, SWEGIS. All rights reserved.

5
BUFFER
Buffers selected features in a theme. If no features are selected then all features will be processed. The buffer distance can be from a field in the feature attribute table, a related table or any user- defined distance. In all of these cases the buffer distance must be a numeric value. If the buffer distance is null, then 0 will be used instead. When using a related table (lookup table), the relate-field must have the same name in both the themes attribute table and the relate table. The distance will be taken from a field that shall be named 'dist' in the relate table. If no such field can be found, buffer will bail out. The relate- table can be dBase (.dbf), INFO, or delimited text. Depending on what kinds of theme you are buffering will you get various options, but common to all is what kind of structure the out- theme shall have. Either you can choose contiguous, which makes all overlapping polygons into one, or you can choose noncontiguous and allow polygons to overlap. There is a known problem when selecting contiguous on thin donut polygons on ArcView GIS 3.0 or 3.0a. For more help on this see the troubleshooting section.

Buffer theme: Theme, which selected features, shall be buffered. Buffer input: Selects from where the buffer distance shall be taken. Can be one of three options. Buffer distance: Buffer distance is entered in the Buffer Distance box. Buffer field: Buffer distance is taken from a feature attribute table field. Buffer table: Buffer distance is taken from a table containing a field that match a field in your feature attribute table and a field named 'DIST'. The values in the dist field will be used as buffer distance. Out structure: Specifies what structure the out theme shall have. Can be one of two options. Noncontiguous: Output polygons may overlap. Contiguous: Output polygons do not overlap. Out theme: The theme that will contain the result of the buffer operation.

Buffer option: Selects which buffer options you want. The options depend on what kind of theme you are buffering. The options are. Polygons: - Inside/Outside: Buffers the outside (+value) or inside (-value) of a polygon. - Polygon+/Polygon-: Grows (+value) or shrinks (-value) input polygon - Boundary: Buffers the polygon boundary as a line. - Nodes & Vertex: Buffers the polygons' nodes and vertices.

Copyright 1998-2000, SWEGIS. All rights reserved.

6
Lines: - Line: Buffers the whole lines - Nodes: Buffers all nodes - NodeF: Buffers from-nodes (first node) - NodsT: Buffers to-nodes (last node) - Nodes & Vertex: Buffers all nodes and vertices. - Only Vertex: Buffers all vertices (not first and last node) Buffer distance: Buffer distance from keyboard. Buffer field/Relate field: Name of the buffer field if a buffer field is used or the relate- field if a buffer table is used. Relate table: Path to the buffer table. The table must contain a field that match the selected field in the relatefield option and the field 'DIST'. The values in the dist field will be used as buffer distance.

Buffer a polygon theme


When buffer a polygon theme you will get four options:
- Inside/Outside: Buffers the outside (+value) or inside (-value) of a polygon. Example:

- Polygon+/Polygon-: Grows (+value) or shrinks (-value) input polygon Example:

- Boundary: Buffers polygon boundary as a line. Example:

Copyright 1998-2000, SWEGIS. All rights reserved.

7
- Nodes & Vertex: Buffers the polygons' nodes and vertices. Example:

Buffer a line theme


When buffer a line theme you will get five options:
- Line: Buffers lines Example:

- Nodes: Buffers all nodes Example:

- NodeF: Buffers from-nodes Example:

- NodsT: Buffers to-nodes Example:

Copyright 1998-2000, SWEGIS. All rights reserved.

8
- Nodes & Vertex: Buffers nodes and vertices. Example:

- Only Vertex: Buffers vertex. Example:

Buffer a point theme


When buffer a point theme there are no extra options. Example:

Buffer a multipoint theme


When buffer a multipoint theme there are no extra options. Example:

Executing the Buffer script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (e.g. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Buffer) - anObj, in this case its the list of parameters that shall be used.

Copyright 1998-2000, SWEGIS. All rights reserved.

9
The list shall contain 7 parameters. All parameters shall be parsed as strings. Parameter 1 In theme, the name of the in theme as it appears in the active view. Parameter 2 Out theme, path to the outfile. Parameter 3 Can be one of three options: Buffer Distance, Buffer Field or Buffer Table. Parameter 4 Depends on which option you choose as parameter three. If parameter 3 = Buffer Distance, just enter the buffer distance you prefer. If parameter 3 = Buffer Field, enter the name of the field that shall be used. If parameter 3 = Buffer Table, enter the name of the field that shall be used as "relate field" Parameter 5 Depends on which option you choose as parameter three. If parameter 3 = Buffer Distance or Buffer Field, leave this parameter blank (i.e. ""). Note that this parameter has to be sent anyway. If parameter 3 = Buffer Table, enter the path to the relate table. Parameter 6 Depends on the kind of the in-theme. If the in-theme is a polygon theme, the parameter can be either; Outside/Inside, Polygon+/Polygon-, Nodes & Vertex or Boundary depending on which option you shall use. If in-theme is a line theme, the parameter can be either; Line, Nodes, NodeF, NodeT, Nodes & Vertex or Only Vertex depending on which option you shall use. If in-theme is a point theme or a multipoint theme this parameter shall be left blank (i.e. ""). Note that it has to be sent anyway. Parameter 7 Decides the out structure. The options are Contiguous or Noncontiguous. The list of parameters shall always contain seven parameters no matter which options that are used. Example: av.Run("Analysis.Buffer",{"theme1.shp","c:\temp\buffer.shp","Buffer Field","dist","","Nodes","Contiguous"}) This example uses a line theme called theme1.shp to create the out theme buffer.shp. The buffer distance is taken from the field dist and only the nodes are buffered. The out structure is contiguous. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

10

Copyright 1998-2000, SWEGIS. All rights reserved.

11
DISTANCE
Calculates the plane distance and/or bearing from features in one theme to features in another. If you are using non- point themes then the bearing will be calculated to and from the shape's centroid, actually the center of the shape-extent. The bearing are calculated in degrees from north and the distance in map units. Note that its the closest distance thats calculated to and from polygons and lines. You can select to use all features or only the selected features. The result are a table containing id field(s) from each theme, plane distance between these features, plane bearing from features in the first theme to features in the second and an id field with a unique id for each record. The id field is named Dist_ID, the field containing the distances will be named Distance and the field containing the bearing will be named Bearing. When the operation is done the table is added to your project. If a search radius is wanted this can be specified. Only features that lay within this distance will then be added to the result table. The distance operation works much like the pointdistance command in ARC/INFO, except that all kind of shapes (polygon, point, multipoint, and line) can be processed. Three dialogs will guide you through the process.

First theme: The first theme whose features shall be processed. Only selected: Specifies whether all features shall be used or only the selected. In fields: Available attribute fields. First ID fields: Specifies the fields that shall be used to identify the features in the first theme. At least one field must be used.

Copyright 1998-2000, SWEGIS. All rights reserved.

12
Second theme: The second theme whose features shall be processed. Only selected: Specifies whether all features shall be used or only the selected. In fields: Available attribute fields. First ID fields: Specifies the fields that shall be used to identify the features in the second theme. If any of these fields have the same name as the first id fields, then that field will be renamed with a 'b' at the end. At least one field must be used.

Calculate: Specifies what calculate mode to use. Out table: The table that will contain the result of the distance operation. Search radius: If wanted a search radius can be specified here.

Example:

First distance theme (points).

Second distance theme (lines).

First themes table.

Second themes table.

Copyright 1998-2000, SWEGIS. All rights reserved.

13

Out table Executing the Distance script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Distance) - anObj, in this case the list of parameters that shall be used. The list shall contain 9 parameters. All parameters shall be parsed as strings or lists. Parameter 1 First theme, the name of the first theme as it appears in the active view. Parameter 2 Specifies if the selected or all shapes in first theme shall be used. Can be either true or false. Parameter 3 A list containing the fields that shall be used to identify features from the first theme. Parameter 3 Second theme, the name of the second theme as it appears in the active view. Parameter 5 Specifies if the selected or all shapes in second theme shall be used. Can be either true or false. Parameter 6 A list containing the fields that shall be used to identify features from the second theme. Parameter 7 Out theme, path to the outfile. Parameter 8 Search radius to use. If no radius shall be used just leave this parameter blank (i.e. "") Parameter 9 Specifies which calculate mode that shall be used. Can be one of three options: distance, bearing or distanceandbearing. The list of parameters shall always contain nine parameters. Example: av.Run("Analysis.Distance",{"theme1.shp","false",{"id","area"},"theme2.shp","false",{"id"},"c:\temp\dist.dbf", "70","distanceandbearing"}) This example the themes theme1.shp and theme2.shp is used to create the out theme dist.dbf. In this case the search radius 70 is used.

Copyright 1998-2000, SWEGIS. All rights reserved.

14

Copyright 1998-2000, SWEGIS. All rights reserved.

15
NEAR
Computes the plane distance/bearing from each selected feature in one theme to the nearest selected feature in another theme. If any of the themes don't contain any selected features, then all features in that theme will be processed. If you are using non- point themes then the bearing will be calculated to and from the center of the shape-extent. The bearing are calculated in degrees and the distance in map units. A search radius can be specified if you only want to search for nearest features within a certain radius. The distance will be saved in a field named Distance and bearing will be saved in a field named Bearing. If a search radius has been specified, then distances that not lies within the radius will get a "null" value in the distance field. The out theme will contain all the fields from the in theme, a field named Distance, a field named Bearing, and the fields that you specify. If the in-theme already contains the fields distance or bearing then those fields will be updated. You can calculate distance/bearing from any kind of theme (polygon, line, point or multipoint) to any other kind of theme.

In-theme: The theme containing features from which distances/bearing are calculated to each closest feature in the near-theme. Near-theme: The theme whose features are used to calculate distances/bearing from each feature in the intheme. In-fields: Available attribute fields. Near theme: Specifies the fields that shall be used to identify the features in the near theme. If any of these fields have the same name as an in-theme field, then the field will be renamed with a 'b' at the end. Distance: Only distance is calculated. Bearing: Only bearing is calculated. Distance/Bearing: Both distance and bearing are calculated. Out theme: The theme containing the result of the near operation (identical with the in- theme but with the extra distance/bearing field(s). Search radius: Enter here if a search radius is wanted.

Copyright 1998-2000, SWEGIS. All rights reserved.

16
Near on a point-theme to a polygon-theme
Example:

Near on a point-theme to a line-theme


Example:

Near on a point-theme to a point-theme


Example:

Near on a point-theme to a multipoint-theme


Example:

Copyright 1998-2000, SWEGIS. All rights reserved.

17
Executing the Near script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Near) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 6 parameters. All parameters shall be parsed as strings or lists. Parameter 1 In theme, the name of the in theme as it appears in the active view. Parameter 2 Near theme, the name of the near theme as it appears in the active view. Parameter 3 A list containing the fields that shall be used to identify features in the near theme. Parameter 4 Specifies which calculate mode that shall be used. Can be one of three options: distance, bearing or distanceandbearing. Parameter 5 Out theme, path to the outfile. Parameter 6 Search radius to use. If no radius shall be used just leave this parameter blank (i.e. "") The list of parameters shall always contain six parameters. Example: av.Run("Analysis.Near",{"theme1.shp","theme2.shp",{"id"},"distance","c:\temp\near.shp",""}) This example the themes theme1.shp and theme2.shp is used to create the out theme near.shp. In this case no search radius is used. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

18

Copyright 1998-2000, SWEGIS. All rights reserved.

19
CLIP
Extracts selected features from a theme that overlaps another theme using the clip-theme as a 'cookie cutter'. If no features are selected, then all features will be processed. If any of the polygons in the clip- theme are selected, then only those polygons will be used in the clipping process. The in-theme could be of polygon, line, point or multipoint kind. Please make sure that the clip-polygons that are neighboring each other lays within the snap tolerance when clipping polygon themes, otherwise this boundary will show on the out-theme. Please notice that the clip-polygons don't have to neighbor each other.

In-theme: The theme whose features shall be clipped. Clip-theme: The theme whose outer polygon defines the clipping region. This must be a polygon theme. Out-theme: The theme that will contain the result of the clip operation.

Clip a polygon theme


When clipping a polygon theme the result theme will contain the fields from the in-theme and three more fields: area, perimeter and clip_id. The area and perimeter are calculated for each new polygon and the polygon is given a new unique id. If the in-theme already contains the fields area, perimeter or clip_id, then those fields will be overwritten. Example:

In-Theme

Clip-Theme

Out-Theme

Clip a line theme


When clipping a line theme the result theme will contain the fields from the in-theme and two more fields: length and clip_id. The length is calculated for each new line and the line is given a new unique id. If the intheme already contains the fields length or clip_id, then those fields will be overwritten. Example: In-Theme Clip-Theme Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

20
Clip a point theme
When clipping a point theme the result theme will contain the fields from the in-theme and an extra field called clip_id. The clip_id field will contain a new unique id. If the in-theme already contains the field clip_id, then this will be overwritten. Example:

In-Theme

Clip-Theme

Out-Theme

Clip a multipoint theme


When clipping a multipoint theme the result theme will contain the fields from the in-theme and an extra field called clip_id. The clip_id field will contain a new unique id. If the in-theme already contains the field clip_id, then this will be overwritten. Because of a bug in ArcView GIS 3.0 the out-theme will be of point type and not of multipoint type. Example:

In-Theme

Clip-Theme

Out-Theme

Executing the Clip script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Clip) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings. Parameter 1 In-theme, the name of the in theme as it appears in the active view. Parameter 2 Clip-theme, the name of the clip theme as it appears in the active view. Parameter 3 Out theme, path to the outfile. The list of parameters shall always contain three parameters.

Copyright 1998-2000, SWEGIS. All rights reserved.

21

Example: av.Run("Analysis.Clip",{"theme1.shp","theme2.shp","c:\temp\clipped.shp"}) This example uses a theme called theme2.shp to clip theme1.shp and creates the out-theme clipped.shp. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

22

Copyright 1998-2000, SWEGIS. All rights reserved.

23
ERASE COVER
Erases features from a theme that overlaps another theme, using the erase theme as a 'cookie cutter'. If any of the features in the in theme are selected then only those will be processed. If any of the features in the erase theme are selected then only those will be used as "erase polygons". The in-theme could be of polygon, line, point or multipoint kind. Please make sure that the erase-polygons that are neighboring each other lays within the snap tolerance when working with polygon themes, otherwise this boundary will show on the out theme. Please notice that the erase-theme polygons don't have to neighbor each other.

In-theme: The theme whose features shall be erased. Erase-theme: The theme whose outer polygon defines the erase region. This must be a polygon theme. Out-theme: The theme that will contain the result of the erase operation.

Erase a polygon theme


When erasing on a polygon theme the result theme will contain the fields from the in-theme and three extra fields: area, perimeter and erase_id. The area and perimeter is calculated for each new polygon and the polygon is given a new unique id. If the in-theme already contain the fields area, perimeter or erase_id, then those fields will be overwritten. Example:

In-Theme

Erase-Theme

Out-Theme

Erase a line theme


When erasing on a line theme the result theme will contain the fields from the in-theme and two extra fields, length and erase_id. The length is calculated for each new line and the line is given a new unique id. If the intheme already contain the fields length or erase_id, then those fields will be overwritten. Example:

In-Theme

Erase-Theme

Out-Theme

Erase a point theme

Copyright 1998-2000, SWEGIS. All rights reserved.

24
When erasing on a point theme the result theme will contain the fields from the in-theme and an extra field called erase_id. The erase_id field will contain a new unique id for each point. If the in-theme already contains the field erase_id then that will be overwritten. Example:

In-Theme

Erase-Theme

Out-Theme

Erase a multipoint theme


When erasing on a multipoint theme the result theme will contain the fields from the in-theme and an extra field called erase_id. The erase_id field will contain a new unique id for each multipoint. If the in-theme already contains the field erase_id then that will be overwritten. Because of a bug in ArcView GIS 3.0, the out-theme will be of point kind and not of multipoint kind. Example:

In-Theme

Erase-Theme

Out-Theme

Executing the EraseCover script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.EraseCover) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings. Parameter 1 In-theme, the name of the in theme as it appears in the active view. Parameter 2 Erase-theme, the name of the erase theme as it appears in the active view. Parameter 3 Out-theme, path to the outfile. The list of parameters shall always contain three parameters. Example: av.Run("Analysis.EraseCover",{"theme1.shp","theme2.shp","c:\temp\erase.shp"}) This example uses a theme called theme2.shp to "erase" theme1.shp and creates the out-theme erase.shp. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

25
UPDATE
Replaces areas in one theme using features another theme. Overlays the in-theme with the update-theme and replaces selected polygons in the in-theme with the selected polygons in the update-theme where they overlap. If no polygons in any of the themes are selected, then all polygons in that theme will be processed. Both themes have to be of polygon kind. The out-theme will contain all fields from both themes except if the theme contains the ARC/INFO standard fields cover_ id or cover_, then those fields won't be copied to the out-theme. The output theme will contain the following extra fields: area, perimeter and update_id. The area and perimeter are calculated for each new polygon and the polygons are given a new unique id. If any of the themes already contains the fields area, perimeter or update_id, then those will be overwritten.

In-theme: Theme containing the polygons that shall be updated. Update-theme: Theme containing the polygons that shall update the in theme. Out theme: The theme containing the result of the update operation.

Example:

In-Theme

Update-Theme

Out-Theme

Executing the Update script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Update) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings. Parameter 1 In-theme, the name of the in-theme as it appears in the active view. Parameter 2 Update-theme, the name of the update-theme as it appears in the active view.

Copyright 1998-2000, SWEGIS. All rights reserved.

26
Parameter 3 Out-theme, path to the outfile. The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Update",{"theme1.shp","theme2.shp","c:\temp\updat.shp"}) This example uses a theme called theme2.shp to update theme1.shp and creates the out-theme updat.shp. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

27
DISSOLVE
Merges adjacent polygons that have the same value in a specified field (or fields). If any polygons are selected the only those will be processed. Dissolve is often used to simplify a complex theme to a less complex one. It removes boundaries between polygons that have the same values in one or several fields. The output theme will contain the following fields: area, perimeter, dissolve_id and the fields used for the dissolve operation. The area and perimeter are calculated for each new polygon and the polygon is given a new unique id. If the theme already contains the fields area, perimeter or disslove_id, then those will be overwritten. Please note that the neighboring polygons that shall by dissolved must lie within the snap tolerance, otherwise this boundary still remains in the out-theme. An ARC/INFO coverage with a correct topology is preferable.

In-theme: The theme whose features shall be dissolved. Out-theme: The theme that will contain the result of the dissolve operation. In-fields: The fields in the selected theme. Dissolve-fields: The fields that shall be used as dissolve fields.

Example:

Dissolve-theme

Out-theme

Copyright 1998-2000, SWEGIS. All rights reserved.

28

Dissolve-theme table Executing the Dissolve script in batch mode.

Out-theme table

This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Dissolve) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings or lists. Parameter 1 In-theme, the name of the theme that shall be dissolved as it appears in the active view. Parameter 2 A list of strings containing the fields that shall be used for dissolve the dissolve operation. Parameter 3 Out-theme, path to the outfile.

The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Dissolve",{"theme1.shp",{"id","code"},"c:\temp\dissolve.shp"}) This example uses a theme called theme1.shp and dissolves on the fields id and code to create the out-theme dissolve.shp. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

29
ELIMINATE
Merges selected polygons with neighboring polygons by dropping the longest shared border between them. This tool is only available if the theme has some selected polygons. This could be done either with the query manager or interactively. The operation works much like the ARC/INFO eliminate command, but with one major advantage, if wanted the attributes can be preserved. This is optional and will cause the operation to take longer time to perform. You can self specify which attributes that shall be preserved. The new polygon that is created when two (or more) polygons are merged will get the attributes from the polygon with the greatest area. This gives the new polygon attributes from the polygon that it most likely ought to have. The out-theme will contain the extra fields elim_id, area and perimeter. If the in-theme already contained any of these fields, then those are overwritten. The area and perimeter are calculated for each new polygon and the polygon is given a new unique id. Eliminate is often used to remove sliver polygons. Please note that the neighboring polygons that shall be processed must lie within the snap tolerance, otherwise this boundary still remains in the out theme. An ARC/INFO coverage with a no overlapping polygons is preferable for this operation.

In-theme: The theme that shall be processed. Out-theme: The theme that will contain the result of the eliminate operation. In-fields: Available fields in the eliminate theme. Out-fields: Attribute fields that shall be preserved in the out theme. This option is optional.

Example:

Eliminate-Theme

Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

30
Executing the Eliminate script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Eliminate) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings or lists. Parameter 1 Eliminate-theme, the name of the in-theme as it appears in the active view. Has to have some selected polygons. Parameter 2 A list containing the fields that shall be preserved in the out theme. If no fields shall be preserved just leave the list empty (i.e. {}). Parameter 3 Out-theme, path to the outfile. The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Eliminate",{"theme1.shp",{"code"},"c:\temp\elim.shp"}) In this example the selected polygons in theme1.shp are processed to create the out-theme elim.shp. The batch mode works just like the ordinary mode so the eliminate-theme must have some selected features.

Copyright 1998-2000, SWEGIS. All rights reserved.

31
EXPLODE
Explodes all selected lines or polygons. If no features are selected, then all will be processed. When performing the explode operation all "multi- part" object will be separated into their smaller shapes. This is a useful tool if you have polygons or lines that have been unioned into one shape and you want to "un-union" them again. If the themes attribute tables contain the fields area, perimeter or length then those values will be updated with the correct values for the particular shape. All other attribute values will be copied to the new shapes. You can choose to either create a new theme or edit an existing theme. If you want to edit an existing theme must it be editable.

Explode-theme: The theme whose features shall be exploded. Out-theme: The theme that will contain the result of the explode operation. If you want to edit an existing theme please select start editing first. Example:

In- Theme

Out- Theme

In- Theme table

Out- Theme table

Copyright 1998-2000, SWEGIS. All rights reserved.

32
Executing the Explode script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (e.g. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Explode) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings. Parameter 1 In-theme, name of the in-theme as it appears in the active view. Parameter 2 Specifies whether you want an out theme or not. The options are true or false. - True, if an out theme is wanted. - False, if you want to edit an existing theme. Note that the theme must be set to start editing first. Parameter 3 Out-theme, path to the outfile. If parameter 2 is false just leave this option blank (i.e. ""). The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Explode",{"theme1.shp","true","c:\temp\expl.shp"}) This example the selected polygons in theme1.shp are exploded to create the out-theme expl.shp. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

33
GENERALIZE
Generalizes or cleans the selected shapes in a line or polygon theme. If no shapes are selected, then all will be processed.

Generalize-theme: The theme that shall be generalized. Tolerance value: The tolerance to use. Mode: Can by one of three. -Douglas-Peucker Choose this if you want to generalize the theme with the Douglas-Peucker algorithm. -Fast Clean: Choose this if you want to make a fast clean. -Slow clean: Choose this if you want to make a better clean. Out-theme: The theme containing the result from the operation.

The three different options do the following. Douglas-Peucker: Generalizes a theme with the Douglas-Peucker algorithm (same as ARC/INFO). If you choose this option will you have to specify a tolerance. The tolerance shall be specified in map units and are the maximum distance from the trend line.

Copyright 1998-2000, SWEGIS. All rights reserved.

34
Fast Clean: Cleans a theme with ArcView's built in algorithm. This operation is necessary if somehow your theme has become "dirty". This option does NOT remove or move any vertices. The result will be clean shapes. A clean polygon is one that: 1. Have no self-intersections. This means that a segment belonging to one ring may not intersect a segment belonging to another ring. The rings of a polygon can touch each other at vertices, but not along segments. 2. Has the inside of the polygon on the "correct" side of the line, which defines it. The neighborhood to the right of an observer walking along the ring in vertex order is the inside of the polygon. Vertices for a single, ringed polygon are, therefore, always in clockwise order. Rings defining holes in these polygons have a counterclockwise orientation. "Dirty" polygons occur when the rings, which define holes in the polygon also, go clockwise, which causes overlapping interiors. A clean line is one that: Don't contain nodes where only two parts meet. Slow Clean: Cleans the theme in the same way as fast clean but in a more thoroughly way.

Executing the Generalize script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (e.g. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Generalize) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 4 parameters. All parameters shall be parsed as strings. Parameter 1 In- theme, name of the in theme as it appears in the active view. Parameter 2 Specifies which mode you shall use. The mode can be one of three options: dp: generalizes the theme with the Douglas-Peucker algorithm. clean1: makes a fast clean clean2: makes a slow clean Parameter 3 This parameter shall only be used if parameter 2 is dp. It shall then be the tolerance in map units. If parameter 2 isn't dp, then just leave this parameter blank (i.e. ""). Parameter 4 Out-theme, path to the outfile. The list of parameters shall always contain four parameters. Example: av.Run("Analysis.Generalize",{"graphi1.shp","dp","60","c:\temp\gen.shp"}) In this example the selected polygons in graphi1.shp are generalized with the Douglas-Peucker algorithm, using the tolerance 60, creating the theme gen.shp.

The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

35
MAPJOIN
Combines the selected features from several themes into one. If any of the themes don't contain any selected features, then all features will be processed. Mapjoin copies features from a number of themes into one. The themes could be of polygon, line, point or multipoint kind. The operation will copy all fields from all tables to the output table except if any of the themes contains the ARC/INFO standard fields cover_ id or cover_, then those fields wont be copied to the out theme. If any of the join-themes have the same field names then both themes values will be copied to the same field.

Theme-type: The type of themes that shall be joined. Themes: Available themes in view. Join-themes: The themes that shall be joined. Out-theme: The theme that will contain the joined themes.

MapJoin on a polygon theme


When performing mapjoin on a polygon theme the result theme will have three extra fields: area, perimeter and join_id. The area and perimeter is calculated for each new polygon and the polygon is given a new unique id. If any of the join-themes already contains the fields area, perimeter or join_id, then those fields will be overwritten. Example:

First-Theme

Join-Theme

Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

36
Mapjoin on a line theme
When performing mapjoin on a line-theme the result theme will have two more fields, length and join_id. The length is calculated for each new line and the line is given a new unique id. If any of the join-themes already contains the fields length or join_id, then those fields will be overwritten. Example:

First-Theme

Join-Theme

Out-Theme

Mapjoin on a point theme


When performing mapjoin on a point-theme the result theme will contain an extra field called join_id. The join_id field will contain a new unique id for each point. If any of the join themes already contains the field join_id, then that will be overwritten. Example:

First-Theme

Join-Theme

Out-Theme

Mapjoin on a multipoint theme


When performing mapjoin on a multipoint-theme the result theme will contain an extra field called join_id. The join_id field will contain a new unique id for each multipoint. If any of the join themes already contains the field join_id, then that will be overwritten. Example:

First-Theme

Join-Theme

Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

37
Executing the MapJoin script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Mapjoin) - anObj, in this case is it a list of parameters that shall be used. The list can contain any number of parameters, but two is the minimum. All parameters shall be parsed as strings. Parameter 1 Out theme, path to the outfile. Parameter 2 The theme that shall be joined. Parameter X The themes that shall be joined.

Example: av.Run("Analysis.Mapjoin",{"c:\temp\maps.shp","theme1.shp","theme2.shp","theme3.shp"}) This example uses a the themes theme1.shp, theme2.shp and theme3.shp and joins them to the out theme maps.shp.

The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

38

Copyright 1998-2000, SWEGIS. All rights reserved.

39
SPLIT
Splits one theme into several themes. The in-themes selected features will be clipped into several themes whose boundaries are defined by the selected polygons in the split theme. If no polygons are selected, then all polygons will be used. This operation works on any kind of theme but the split theme must be of polygon kind. The out-theme will contain all the attribute data from the in theme and some extra field depending on of what kind the in-theme is. Point theme: Split_id Multipoint theme Split_id Line theme Split_id, length Polygon theme Split_id, area, perimeter If the in-theme already contains any of these fields then those will be overwritten.

In-theme: Theme that shall be splitted. Split-theme: Theme whose polygons are used to define the boundaries of the out themes. Out-themes: Themes containing the result of the operation. Use the buttons to browse in the out theme list. Example:

In-theme

Split-theme

Out-theme (1)

Out-theme (2)

Out-theme (3)

Copyright 1998-2000, SWEGIS. All rights reserved.

40
Executing the Split script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Split) - anObj, in this case is it a list of parameters that shall be used. The list can contain any number of parameters, but two is the minimum. All parameters shall be parsed as strings. Parameter 1 In-theme, the name of the in theme as it appears in the active view. Parameter 2 Split-theme, the name of the split theme as it appears in the active view. Parameter X Path to the out-files. The number of paths must match the number of (selected) polygons in the split theme.

Example: av.Run("Analysis.Split",{"theme1.shp","theme2.shp","c:\temp\split.shp","c:\temp\split2.shp"}) This example splits theme1.shp with theme2.shp and creates the out-themes split.shp and split2.shp. In this case the split theme has two polygons. Therefore you need to specify two out themes. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

41
INTERSECT
Computes the geometric intersection of two themes. If any of the themes has any selected features, then only those will be processed. Only those features in the area common to both are preserved. Feature attributes from both themes are joined in the output theme. The first theme could be of polygon, line, point or multipoint kind, but the second theme must be a polygon-theme. The-out theme will contain all the fields from both the first theme and the second theme. If any of the second theme fields have the same name as a first theme field, then the field will be renamed with a 'b' at the end.

First theme: The theme that will be overlaid with the second theme. Second theme: The overlay theme containing polygon features. Out theme: The theme that will contain the result of the intersect operation.

Intersect on a polygon theme


When performing the intersect operation on a polygon theme the output theme will contain the following extra fields: area, perimeter and inter_id. The area and perimeter are calculated for each new polygon and the polygon is given a new unique id. If any of the themes already contains the fields area, perimeter or inter_id, then those will be overwritten. Example:

In-Theme

Intersect-Theme

Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

42

Intersect on a line theme


When performing the intersect operation on a line theme the output theme will contain the extra fields length and inter_id. The length is calculated for each new line and the line is given a new unique id. If any of the themes already contains the fields length or inter_id, then those will be overwritten. Example:

In-Theme

Intersect-Theme

Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

43

Intersect on a point theme


When performing the intersect operation on a point theme the output theme will contain the extra field inter_id. This field will contain a new unique id for each point. If any of the themes already contains the field inter_id, then this will be overwritten. Example:

In-Theme

Intersect-Theme

Out-Theme

Intersect on a multipoint theme


When performing the intersect operation on a multipoint theme the output theme will contain the extra field inter_id. This field will contain a new unique id for each multipoint. If any of the themes already contains the field inter_id, then that will be overwritten. Because of a bug in ArcView GIS 3.0 the out-theme will be of point kind and not of multipoint kind.

Copyright 1998-2000, SWEGIS. All rights reserved.

44
Executing the Intersect script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Intersect) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings. Parameter 1 First theme, the name of the first theme as it appears in the active view. Parameter 2 Second theme, the name of the second theme as it appears in the active view. Parameter 3 Out theme, path to the outfile. The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Intersect",{"theme1.shp","theme2.shp","c:\temp\inter.shp"}) This example uses a theme called theme1.shp overlays it with theme2.shp and creates the out theme inter.shp. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

45
IDENTITY
Computes the geometric intersection of two themes. If any of the themes has any selected features, then only those will be processed. Only those features overlaying the feature extent of the first selected theme are preserved. Feature attributes from both themes are joined in the output theme. The first theme could be of polygon, line, point or multipoint kind but the second theme must be a polygon theme. The out theme will contain all the fields from both the first theme and the second theme. If any of the second theme fields have the same name as a first theme field, then the field will be renamed with a 'b' at the end.

First theme: The theme that will be overlaid with the second theme. Second theme: The overlay theme containing polygon features. Out theme: The theme that will contain the result of the identity operation.

Copyright 1998-2000, SWEGIS. All rights reserved.

46
Identity on a polygon theme
When performing the identity operation on a polygon theme the output theme will contain the following extra fields: area, perimeter and ident_id. The area and perimeter are calculated for each new polygon and the polygon is given a new unique id. If any of the themes already contains the fields area, perimeter or ident_id, then those will be overwritten. Example:

In-Theme

Identity-Theme

Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

47
Identity on a line theme
When performing the identity operation on a line theme the output theme will contain the extra fields length and ident_id. The length is calculated for each new line and the line is given a new unique id. If any of the themes already contains the fields length or ident_id, then those will be overwritten. Example:

In-Theme

Identity-Theme

Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

48
Identity on a point theme
When performing the identity operation on a point theme the output theme will contain the extra field ident_id. This field will contain a new unique id for each point. If any of the themes already contains the field ident_id, then this will be overwritten. Example:

In-Theme

Identity-Theme

Out-Theme

Identity on a multipoint theme


When performing the identity operation on a multipoint theme the output theme will contain the extra field ident_id. This field will contain a new unique id for each multipoint. If any of the themes already contains the field ident_id, then this will be overwritten. Because of a bug in ArcView will the out theme be of point kind and not of multipoint kind.

Copyright 1998-2000, SWEGIS. All rights reserved.

49
Executing the Identity script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Identity) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings. Parameter 1 First theme, the name of the first theme as it appears in the active view. Parameter 2 Second theme, the name of the second theme as it appears in the active view. Parameter 3 Out-theme, path to the outfile. The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Identity",{"theme1.shp","theme2.shp","c:\temp\ident.shp"}) This example uses a theme called theme1.shp, overlays it with theme2.shp and creates the out theme ident.shp. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

50

Copyright 1998-2000, SWEGIS. All rights reserved.

51
UNION
Computes the geometric intersection of two polygon themes. If any of the themes has any selected features, then only those will be processed. All features and attributes of both themes are preserved. Feature attributes from both themes are joined in the out- theme. Both the first theme and the second theme have to be polygon themes. The out-theme will contain all the fields from both the first theme and the second theme. If any of the second theme fields have the same name as a first theme field, then the field will be renamed with a 'b' at the end. The output theme will contain the following extra fields: area, perimeter and union_id. The area and perimeter are calculated for each new polygon and the polygons are given a new unique id. If any of the themes already contains the fields area, perimeter or union_id, then those will be overwritten.

First theme: The first polygon-theme that shall by unioned. Second theme: The second polygon-theme that shall be unioned. Out theme: The theme containing the result of the union operation. Example:

In-Theme

Union-Theme

Out-Theme

Copyright 1998-2000, SWEGIS. All rights reserved.

52
Executing the Union script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Union) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings. Parameter 1 First theme, the name of the first theme as it appears in the active view. Parameter 2 Second theme, the name of the second theme as it appears in the active view. Parameter 3 Out-theme, path to the outfile. The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Union",{"theme1.shp","theme2.shp","c:\temp\union.shp"}) This example uses a theme called theme1.shp overlays it with theme2.shp and creates the out theme union.shp. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

53
GRAPHICTOSHAPE
Converts the selected graphics to a shapefile. If no graphics are selected then all graphics will be processed. Depending on what kind of out-theme you would like can you choose to include different graphic types. If you choose a polygon out-theme then the extra field's area and perimeter will be added. These will contain the area and perimeter for each polygon. If you choose a line out theme then the extra field length will be added. This field will contain the length for each new line. The out theme will also have a field named ID, which contains a unique number for each shape.

Out-shape type: Specify here what kind of out theme you would like. Out-theme: The outfile. Include graphic of type: The graphic shape types that you would like to convert.

Executing the GraphicToShape script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.graphicToShape) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 10 parameters. All parameters shall be parsed as strings or booleans. Parameter 1 Out-theme, path to the outfile. Parameter 2 Specify here what kind of out theme you would like. Could be one of four options: polygon, line, multipoint or point. Parameter 3 Set this parameter to true or false depending on if you want to include rectangles or not. Parameter 4 Set this parameter to true or false depending on if you want to include circles or not. Parameter 5 Set this parameter to true or false depending on if you want to include ovals or not.

Copyright 1998-2000, SWEGIS. All rights reserved.

54
Parameter 6 Set this parameter to true or false depending on if you want to include polygons or not. Parameter 7 Set this parameter to true or false depending on if you want to include lines or not. Parameter 8 Set this parameter to true or false depending on if you want to include polylines or not. Parameter 9 Set this parameter to true or false depending on if you want to include multipoints or not. Parameter 10 Set this parameter to true or false depending on if you want to include point or not.

The list of parameters shall always contain ten parameters. Example: av.Run("Analysis.GraphicToShape",{"c:\temp\gra.shp","polygon",true,true,true,true,true,true,true,true}) This example converts all graphic-types and makes the shapefile gra.shp. Note: Only rectangles, circles, ovals, and polygons will be converted since they are the only graphic types that can be included in a polygon theme. The batch mode works just like the ordinary mode so if any graphics are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

55
SHAPETOGRAPHIC
Converts a theme of any kind to graphics. You can self specify whether only the selected records shall be processed or not.

In-theme: The theme that shall be converted to graphics. Selected only: Specifies whether only the selected shapes shall be converted not.

Executing the ShapeToGraphic script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.ShapeToGraphic) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 2 parameters. All parameters shall be parsed as strings or booleans. Parameter 1 The theme that shall be converted to graphics. Parameter 2 Specifies whether only the selected shapes shall be converted not. This parameter shall be true or false.

The list of parameters shall always contain two parameters. Example: av.Run("Analysis.shapetographic",{"roclip90",false}) This example converts all shapes in roclip90 to graphics.

Copyright 1998-2000, SWEGIS. All rights reserved.

56

Copyright 1998-2000, SWEGIS. All rights reserved.

57
CONVERTSHAPE
Converts a shapefile to a shapefile of a different kind. If the in theme has any selected shapes then only those will be processed. The out theme will contain all attribute fields from the in-theme. Depending on what kind of theme you are converting will the new shapes get their attributes in two different ways. If you are converting to a higher standing shape type (line/multipoint to polygon or point to polygon/line/multipoint) the new shape will get the attributes from the first occurrence in the themes features attribute table. If you are converting to a lower standing shape type will the shapes get their attributes from the shape that it was converted from.

In-theme: The theme that shall be converted. Out-theme: The outfile. Options: Sorted: Specifies whether the Ftab is sorted or not. Snap: Enables snapping. Field: The fields that define which parts that define a line, multipoint or polygon.

Out-theme type: Specifies the outfile type.

Depending on what kinds of theme you want to convert will you have to specify different options.

Polygon to: When you convert a polygon theme to a theme of a different kind do you not need to specify any
extra options.

Line to:
Polygon: Converting a line theme to polygons does not guarantee a correct result. What happens is that you will have to specify a field that contains unique values for the lines that defines each polygon. These lines will then be used to create a polygon. Please note that donut polygons are not supported. The polygon can be built in two different ways, sorted or unsorted. If you choose sorted will the lines be added to the polygon in the same order as they appear in the themes FTab. This option gives the best result, so if your FTab is sorted please use this option. If you choose an unsorted mode are the lines sorted on bearing from the center of the lines. If your lines are too complex will this result in bad polygons.

Copyright 1998-2000, SWEGIS. All rights reserved.

58
Converting lines to polygons are mainly made for sorted FTabs so there are no result guarantee. You can also choose whether you want the lines to snap or not. If you choose snapping is the last vertex of each line moved to the first vertex of the next line. Example:

Tip: If each line defines a polygon, then choose a field that contains a unique value for each line. Line: No extra options. Multipoint: No extra options. Point: No extra options.

Multipoint to: Converting a multipoint works exactly as converting a line. See above.
Example:

Point to:
Polygon: Converting a point theme to polygons does not guarantee a correct result. What happens is that you will have to specify a field that contains unique values for the points that defines each polygon. These points will then be used to create a polygon. Please note that donut polygons are not supported. The polygon can be built in two different ways, sorted or unsorted. If you choose sorted are the points added to the polygon in the same order as they appear in the themes FTab. This option gives the best result, so if your FTab is sorted please use this option. If you choose an unsorted mode then the points will be sorted on bearing from the center of the points. If your points are to complex, it will result in bad polygons. Converting points to polygons are mainly made for sorted FTabs so there are no result guarantee. Example:

Copyright 1998-2000, SWEGIS. All rights reserved.

59
Line: Converting a point theme to line does not guarantee a correct result. What happens is that you will have to specify a field that contains unique values for the points that defines each line. These points will then be used to create a line. The line can be built in two different ways, sorted or unsorted. If you choose sorted are the points added to the line in the same order as they appear in the themes FTab. This option gives the best result, so if your FTab is sorted please use this option. If you choose an unsorted mode then the points will be sorted on bearing from the center of the points. If your points lie to complex, it will result in bad lines. Converting points to lines are mainly made for sorted FTabs so there are no result guarantee. Example:

Multipoint: Works just like converting points to lines. See above. Point: No extra options.

Executing the ConvertShape script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.ConvertShape) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 6 parameters. All parameters shall be parsed as strings or booleans. Parameter 1 Path to the outfile. Parameter 2 The theme that shall be converted. Parameter 3 Specifies the out shapetype. Could be one of four: polygon, line, multipoint or point. Parameter 4 The field with unique values for the shapes that shall make the new shape. Only needed if you are converting to a higher standing shape type (line/multipoint to polygon or point to polygon/line/multipoint). Parameter 5 Specifies if snapping shall be used or not. Shall be true or false. This parameter is only needed if you are converting line/multipoint to polygon. If not just leave this parameter blank (i.e. ""). Parameter 6 Specifies whether the FTab is sorted or not. This parameter is only needed if you are converting to a higher standing shapetype (see parameter 4). If not just leave this parameter blank (i.e. "").

Copyright 1998-2000, SWEGIS. All rights reserved.

60
The list of parameters shall always contain six parameters. Example: av.Run("Analysis.ConvertShape",{"c:\temp\conv.shp","theme1.shp","polygon","code",false,true}) This example converts the selected lines in theme1.shp and creates conv.shp. The field code is used to identify which lines that define the polygons. The batch mode works just like the ordinary mode so if any features are selected only those will be processed.

Copyright 1998-2000, SWEGIS. All rights reserved.

61
MAKEGRID
Makes a mesh based on the user input. Works much like generating a grid with ARC/INFO's generate command. The result will be a polygon theme with the field's area, perimeter, and Grid_Id. The area field contains the area for each cell, the perimeter field the perimeter of each cell and Grid_Id a unique id for each cell.

Out-theme: The outfile. Origin coordinate (X,Y): The coordinates of origin. X-axis coordinate (X,Y): Coordinates of a point on the positive X- axis from the origin point. Is used to orient the grid. Cell size (Width, Height): Specifies the cell size. Number of rows, columns: Specifies the number of rows and columns.

Example:

Input from the dialog above.

Copyright 1998-2000, SWEGIS. All rights reserved.

62
Executing the MakeGrid script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.MakeGrid) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 9 parameters. All parameters shall be parsed as strings. Parameter 1 The X-coordinate of the origin. Parameter 2 The Y-coordinate of the origin. Parameter 3 The X-coordinate of a point on the positive X-axis. Parameter 4 The Y-coordinate of a point on the positive X-axis. Parameter 5 The cell width. Parameter 6 The cell height. Parameter 7 The number of columns. Parameter 8 The number of rows. Parameter 9 Path to the outfile. The list of parameters shall always contain nine parameters. Example: av.Run("Analysis.MakeGrid",{"0","0","10","0","50","60","5","5","c:\temp\grid.shp"}) This example makes a 5*5 grid with the cell size 50*60.

Copyright 1998-2000, SWEGIS. All rights reserved.

63
MOVEXY
Moves a theme based on user input. The move distance shall be specified in map units. If the theme has any selected shapes, then only those will be processed.

In-theme: The theme that shall be moved. Out-theme: The outfile. Move (X, Y): The X and Y that the theme shall be moved. Example:

Executing the MoveXY script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.MoveXY) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 4 parameters. All parameters shall be parsed as strings. Parameter 1 The theme that shall be moved. Parameter 2 Path to the outfile. Parameter 3 The distance in map units that the theme shall be moved along the X- axis. Parameter 4 The distance in map units that the theme shall be moved along the Y- axis. The list of parameters shall always contain four parameters. Example: av.Run("Analysis.MoveXY",{"theme1.shp","c:\temp\moved.shp","50","50"}) This example moves theme1.shp and creates the theme moved.shp.

Copyright 1998-2000, SWEGIS. All rights reserved.

64

Copyright 1998-2000, SWEGIS. All rights reserved.

65
ROTATE
Rotates a theme with many different options. If the theme has any selected shapes, then only those will be processed. You can choose to either rotate the shapes around a user point (i.e. X, Y), or rotate them around a system point. The system point can be one of many options. It can be a point in the theme extent, selection extent or the shape extent. The rotation is done in different ways depending on what kind of point you are rotating around. - If you are rotating around a point in the theme extent or selection extent are all shapes rotated around the same point. - If you are rotating around a point in the shape extent is each polygon rotated separately around this shapes system point. The rotation angle could be any of the predefined angles, or a user specified angle. The theme is rotated clockwise.

In-theme: The theme that shall be rotated. Out-theme: The outfile. Rotate around: Specifies whether you want to rotate around a system point or a user point. System point: Specifies the systempoint to use. User point (X, Y): X and Y of the user point. Angle (degrees clockwise): The degrees that the shapes shall be rotated. Example:

Rotated 90 degrees around the themes center point.

Copyright 1998-2000, SWEGIS. All rights reserved.

66
Executing the Rotate script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Rotate) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 7 parameters. All parameters shall be parsed as strings. Parameter 1 The theme that shall be rotated. Parameter 2 Path to the outfile. Parameter 3 The point that the shapes shall be rotated around. Could be one of four: - Theme, rotate around one of the theme extents points. - Shape, rotate around one of the shape extents points. - Selected, rotate around one of the selection extents points. - User, rotate around a user point. Parameter 4 Shall not be used if parameter 3 = user. If it is, then just leave this parameter blank (i.e. ""). Defines what point on the extent that shall be used. Could be one of five: - Downright - Downleft - Uppright - Uppleft - Center Parameter 5 The angle in degrees that the shapes shall be rotated. Parameter 6 The X-coordinate of the user point. Only needed if parameter 3 = user, else just leave this parameter blank (i.e. ""). Parameter 7 The Y-coordinate of the user point. Only needed if parameter 3 = user, else just leave this parameter blank (i.e. ""). The list of parameters shall always contain seven parameters. Example: av.Run("Analysis.Rotate",{"theme1.shp","c:\temp\moved.shp","user","","90","50","90"}) This example rotates theme1.shp around a point with the coordinates 50,90 and creates the theme moved.shp.

Copyright 1998-2000, SWEGIS. All rights reserved.

67
CALCULATECENTER
Calculates the geographic/weighted center or just the centroids of a themes shapes. Note that it isnt the true mathematical centroid thats calculated, only the center of the shapes extent. If the theme contains any selected shapes, then only those will be processed. The result is a point theme with the extra field Cen_Id. This field will contain a unique id for each point.

In-theme: The theme that shall be used. Weight field: The field that shall be used if you want to calculate a weighted center. Option: Weighted/ Geographic center: Calculates a weighted or geographic center. Centroid: Calculate the centroid of each shape. The outfile.

Out theme:

You can calculate three different types of center: - Weighted center: Calculates a center by weighting the centroids of the shapes with a field in the attribute table. Note: A points centroid is the point it self. Example:

In-theme

Out-theme

- Geographic center: Calculates a center by weighting the centroids. Note: A points centroid is the point it self. Example: In-theme Out-theme

Copyright 1998-2000, SWEGIS. All rights reserved.

68
- Centroids: Calculates the centroid for each shape in the theme. The out-theme's points will contain all the attribute data from the shape that it was created from. Example:

In-theme

Out-theme

Executing the CalculateCenter script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.CalculateCenter) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 4 parameters. All parameters shall be parsed as strings. Parameter 1 The theme that shall be used. Parameter 2 Path to the outfile. Parameter 3 Specifies in what way the center shall be calculated. Could be one of three options: - Weighted - Geographic - Centroid Parameter 4 The field that shall be used if you want to calculate a weighted center. If you aren't calculating a geographic center just leave this parameter blank (i.e. "").

The list of parameters shall always contain four parameters. Example: av.Run("Analysis.CalculateCenter",{"theme1.shp","c:\temp\moved.shp","weighted","pop"}) This example a weighted center with the field pop is calculated.

Copyright 1998-2000, SWEGIS. All rights reserved.

69
THIESSEN
Creates thiessen polygons from a point theme. If the in-theme contains any selected shapes, then only those will be used. Thiessen polygons represent the optimal distance area around each point. In other words, Thiessen polygons apportion the areas of a map into regions around a point so that every location in a region is nearer to that region's point than to any other point. Lines that join the circumcentres of adjacent TIN polygons, resulting in a polygon surrounding each point form the polygons. The polygons are clipped to the theme's extent for those triangles that have circumcentres (the center of the circle passing through all three points) lying outside of the hull.

In-theme: The point theme. Out-theme: Out theme. The out theme will contain all attribute data from the in-theme and the extra fields area, perimeter and Thi_ID. The area field will contain the area for each polygon, the perimeter field the perimeter for each polygon and Thi_ID a unique id for each polygon. Example:

Executing the Thiessen script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Thiessen) - anObj, in this case is it a list of parameters that shall be used.

Copyright 1998-2000, SWEGIS. All rights reserved.

70
The list shall contain 2 parameters. All parameters shall be parsed as strings. Parameter 1 The point-theme that shall be used. Parameter 2 Path to the outfile.

The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Thiessen",{"theme1.shp","c:\temp\thiess.shp"}) This example is thiessen polygons built from theme1.shp.

Copyright 1998-2000, SWEGIS. All rights reserved.

71
TIN
Creates a TIN topology from a three-dimensional point theme. The TIN topology is built with Delaunay triangles. These triangles are built so that the circumscribing circle of any triangle encloses no points in the network.

In-theme: The theme containing the three dimensional points. Z field: The field that contains Z information. This must be a numeric field. Out-theme: The out-theme. A TIN is a triangulated irregular network that is used to analyse three-dimensional data. Each triangle is formed by three points from the in-theme. The Z value that is specified in the Z field is used to calculate the slope, aspect, etc. for the specific triangle. If the in theme has any selected shapes, then only those will be used. The out theme's feature table will have several attributes that can help you analyse the surface: - Area, the plain area. - Perimeter, the plain perimeter. - TIN_ID, a unique identifier for each polygon. - Surf_Area, the surface area of the triangle. - Surf_Perimeter, the surface perimeter of the triangle. - Slope, the slope of the triangle (in degrees) - Aspect, the aspect of the triangle (in degrees from north). - Centroid_Z, the Z value of the triangles centroid. - Z1, Z2, Z3, the Z value of the polygons vertexes. Appears in the same order as they appear in the polygon. When a triangle has slope = 0 does it not has an aspect and therefore, the aspect are set to -999. Since the attribute table contains Z-value of the polygon's vertices, it can be used to calculate much more information (e.g. volume, slope length etc). Example:

Copyright 1998-2000, SWEGIS. All rights reserved.

72
Executing the TIN script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Tin) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 3 parameters. All parameters shall be parsed as strings. Parameter 1 The point-theme that shall be used. Parameter 2 Path to the outfile. Parameter 3 The field that contains the Z value for each point.

The list of parameters shall always contain three parameters. Example: av.Run("Analysis.Tin",{"theme1.shp","c:\temp\tin.shp","Z"}) This example a TIN is built from theme1.

Copyright 1998-2000, SWEGIS. All rights reserved.

73
CONTOUR
Creates Contours/ISO-lines from a point theme. If the in-theme contains any selected shapes, then only those will be used. The contours are generated by tracing the value trough a TIN-topology. Contour can either create straight-line contours (linear) or smooth contours. The smooth contours are basically only the result from a splining operation on the linear contours. Note that smoothing the contours too much can create intersecting contours. The smooth tolerance is the distance in map units between vertices that are added to each contour before it is splined. The smaller distance, the more vertices are added. How smooth the contours are getting is the result of the number of points in the in-theme, the length of each individual contour and the smooth tolerance. The out-theme will contain the extra fields length, Contour_ID and Z. The length field will contain the length for each line, the contour_id field a unique value for each line and the Z field the contours Z value.

In-theme: The theme containing the three dimensional points. Z-field: The field that contains Z information. This must be a numeric field. Interval: The interval distance between contours. The interval value is interpreted as an absolute value. Therefore, negative surface values do not require negative intervals. Smooth Tolerance: If you want to output smooth contours, then you shall check this box. The smooth tolerance is the distance in map units between vertices that are added to each contour before it is splined. Min: The lowest contour that shall be calculated. Max: The highest contour that shall be calculated. Out-theme: Out theme. Example:

Copyright 1998-2000, SWEGIS. All rights reserved.

74
Executing the Contour script in batch mode. This option is only available if you have a batch version of the extension. Executing the script in batch mode gives you the capability to run the script without any user interference (i.e. from another script). This can be done with the Avenue request av.Run (aScriptName, anObj). The request needs the two parameters: - aScriptName, the script that shall be executed (i.e. Analysis.Contour) - anObj, in this case is it a list of parameters that shall be used. The list shall contain 8 parameters. All parameters shall be parsed as strings. Parameter 1 The point theme that shall be used. Parameter 2 Path to the outfile. Parameter 3 The field that contains the Z value for each point. Parameter 4 The smooth tolerance that shall be used. Set this parameter to 0 (zero) if you want linear contours. Parameter 5 The interval that shall be used. Can not be zero. Parameter 6 The base value that shall be used. Parameter 7 The min value that shall be used. Parameter 8 The max value that shall be used. This value must be greater then the min value.

The list of parameters shall always contain eight parameters. Example: av.Run("Analysis.Contour",{"theme1.shp","c:\temp\cont.shp","hojd","20","1","0","-1000","0"}) This example contours are built from theme1.

Copyright 1998-2000, SWEGIS. All rights reserved.

75
BUTTONBAR
To show the buttonbar select buttonbar in the menu named Analysis Extension. The buttonbar is a floating bar that always stays on top of every other document. You can self configure the buttonbar to show only those buttons you want. This can be done with the configure option in the menu.

CONFIGURE THE ANALYSIS EXTENS I ON


To configure The Analysis Extension select configure in the named called Analysis Extension. With this dialog can you configure which tools that shall appear where. The tools can be reached from three different places; the menu, the buttonbar or from a floating buttonbar. Which tools that shall appear where can easily be configured by the user.

Floating buttonbar: Select the tools that shall be included in the floating buttonbar here. Standard buttonbar: Select the tools that shall be included in the standard buttonbar here. Menu: Select the tools that shall be included in the menu here. If you choose OK the changes will be saved to a file named analysis.odb in your project directory. If you have more then one project in the same directory, then they will share same settings. If you choose MakeDefault will the changes be saved to a file named analysis.odb in your arcview\etc directory. If you start a new project that doesnt have any settings yet the default settings will be used.

Copyright 1998-2000, SWEGIS. All rights reserved.

76

Copyright 1998-2000, SWEGIS. All rights reserved.

77
ArcZoom

ArcZoom provides ArcView GIS with some really useful zoom tools. These are accessed from a button in the buttonbar. The tools will appear in a floating buttonbar that always stays at the top.

These are the tools: -Pan/Move: Use the arrow buttons to move around in your view. How much that shall be moved at each click can easily be configured by the user. If you hold down the shift key while clicking on these buttons will the configured move distance/percent be increased with a rate that the user self can configure. Pushing the middle button pans to the center of the active themes. -ZoomIn/ZoomOut tools: Works just like ArcView GIS standard zoom tools. -ZoomIn/ZoomOut buttons: Zooms in or out, to and from the center of the view. How much that shall be zoomed can easily be configured by the user. If you hold down the shift key while pushing any of these buttons will the zoom be increased with a user-specified rate. -Save/Delete: Enables you to save "zoom-areas". You can then later go back to these zooms by selecting it in the dropdown box. The zooms are saved in the file zoomsave.odb in your project directory. If you have more then one project in the same directory they will share the same saved "zooms".

Copyright 1998-2000, SWEGIS. All rights reserved.

78
CONFIGURE ARCZOOM
ArcZoom can be configured to fit the users needs as well as possible.

Move parameters: How much the view shall be moved when you are clicking on the various move buttons can be specified in either percent of the view's extent or in map units. If you want to move a percent of the extent shall the number be followed by % (e.g. 50%). The shift key ratio is the number that the move parameter will be multiplied with if you hold down shift when clicking. Startup mode: Here can you specify the startup mode of the ArcZoom dialog. Zoom parameters: Specify here how much that you want to zoom when you are clicking on the zoomIn/zoomOut buttons. The shift key ratio is the number that the zoom parameter will be multiplied with if you hold down shift when clicking. If you choose OK the changes will be saved to a file named arczoom.odb in your project directory. If you have more then one project in the same directory, they will share same settings. If you choose MakeDefault will the changes be saved to a file named arczoom.odb in your arcview\etc directory. If you start a new project that doesnt have any settings yet will the default settings be used.

FILEMANAGER

Displays ArcView GIS built in filemanager. This can be used to rename, copy or delete data sets.

Copyright 1998-2000, SWEGIS. All rights reserved.

79
DEVELOP
This section aims to give you some examples and inspiration to how you can develop your custom commands that are based on The Analysis Extension. This is only possible if you have the batch version of the extension. Examples:

Buffer with predefined distance.


This sample script shows how you can automate the buffer command to use the same buffer distance every time the buffer operation is performed. In this case are the distance 50 used. Can be found on disk number two of the installation diskettes. theView = av.GetActiveDoc rep = 0 wkdir = av.GetProject.GetWorkDir

'Get the active theme theTheme = theView.GetActiveThemes.Get(0) theFtab = theTheme.GetFtab 'Get the shape type theShapeType = theFtab.FindField("Shape").GetType

'Get outfile name fName = FileName.Make(wkdir.AsString).MakeTmp("buff","shp") while (rep = 0) outFileName = FileDialog.Put(fName,"*.shp","Out theme") if (outFileName = NIL) then return nil elseif (outFileName.GetBaseName.AsTokens(".").Get(0).Contains(" ")) then MsgBox.Warning("Output theme name not specified, re-enter.","Warning") else rep = 1 end end

theThemeName = theTheme.AsString outFileName = outFileName.AsString if (theShapeType = #FIELD_SHAPEPOLY) then av.Run("Analysis.Buffer",{theThemeName,outFileName,"Buffer Distance","50","","polygon+/polygon","Contiguous"}) elseif (theShapeType = #FIELD_SHAPELINE) then av.Run("Analysis.Buffer",{theThemeName,outFileName,"Buffer Distance","50","","line","Contiguous"}) else av.Run("Analysis.Buffer",{theThemeName,outFileName,"Buffer Distance","50","","","Contiguous"}) end

Copyright 1998-2000, SWEGIS. All rights reserved.

80
Join and dissolve
This sample script shows how you can automate the mapjoin and dissolve operation. The user can specify any number of themes that shall be joined. When the themes are joined will the user be prompt to specify which field that shall be used as a dissolve field. Can be found on disk number two of the installation diskettes. theView = av.GetActiveDoc counter = 1 rep = 0 wkdir = av.GetProject.GetWorkDir

'Make a list with the polygon themes theThemes = {} for each ttheme in theView.GetThemes if (ttheme.GetFtab.FindField("Shape").GetType = #FIELD_SHAPEPOLY) then theThemes.Add(ttheme) end end

theJoinRunList = {} 'The list that shall be parsed to the MainJoin script. 'Get outfile name fName = FileName.Make(wkdir.AsString).MakeTmp("joined","shp") while (rep = 0) outFileName = FileDialog.Put(fName,"*.shp","Out theme") if (outFileName = NIL) then return nil elseif (outFileName.GetBaseName.AsTokens(".").Get(0).Contains(" ")) then MsgBox.Warning("Output theme name not specified, re-enter.","Warning") else rep = 1 end end 'Runs the script with a temporary out theme. This theme is later removed. theJoinRunList.Add(outFileName.asString.Left(outFileName.asString.Count-6)+"tmp")

'Promt for themes. selectMore = true while (selectMore) aTheme = msgBox.Choice(theThemes,"Select themes that shall be joined","MapJoin & Dissolve "+counter.asString) if (aTheme = Nil) then break else theJoinRunList.Add(aTheme.AsString) end counter = counter+1'A counter so thet the user knows how many theme that are selected. end

av.Run("Analysis.Mapjoin",theJoinRunList) outTheme = theView.GetThemes.Get(0) theFields = outTheme.GetFtab.Clone.GetFields.DeepClone theFields.Remove(0)'Remove shape field

Copyright 1998-2000, SWEGIS. All rights reserved.

81
'Promt for dissolvefield. theDisolveField = msgBox.Choice(theFields,"Select dissolve field","MapJoin & Dissolve ") if (theDisolveField = Nil) then exit end 'Runs the script with the "real" out-filename av.Run("Analysis.Dissolve",{outTheme.AsString,{theDisolveField.AsString},outFileName.AsString}) theOutThemeFileName = outTheme.GetSrcName.GetFileName theView.DeleteTheme (outTheme)'Remove the first theme that was created from the view 'Remove the first theme that was created from the disk. outTheme = Nil theFields = Nil theDisolveField = Nil av.PurgeObjects File.Delete (theOutThemeFileName) File.Delete ((theOutThemeFileName.AsString.Left(theOutThemeFileName.AsString.Count3)+"shx").AsFileName) File.Delete ((theOutThemeFileName.AsString.Left(theOutThemeFileName.AsString.Count3)+"dbf").AsFileName)

Copyright 1998-2000, SWEGIS. All rights reserved.

82

Copyright 1998-2000, SWEGIS. All rights reserved.

83
TROUBLESHOOTING
This section covers the most frequent problems that can occur when using The Analysis Extension. If the information here don't cover what you are seeking for or if you suspect that you have discovered a bug can you always send an e-mail so support@swegis.com. None of the analyses seems to work with my theme. Check the help files to see if you are using a correct kind of theme. Some operations only work with polygon themes etc. Sometimes the operations only work if you convert the themes to shape files first. Don't ask me why this happens cause it really ought to work anyway. Otherwise are you most likely trying to perform the operations on a too complicated theme. With this I mean a theme with a complex structure i.e. polygons with a big variety in size, lots of donut polygon, extremely thin donut polygons etc. This is usually not a result of errors in the extension. The trouble is instead the result of some lack of functionality in ArcView. To circumvent this kind of trouble you will have to simplify the theme.

All of my shapes don't seem to have been processed. If any of the shapes are selected only those will be processed. Unselect all features in the theme. If this doesn't help are you probably trying to process a too complex theme (see above). It just doesn't work. Convert the theme to a shape file and then try again.

Error messages: -To few visible fields: The theme's attribute table contains to few visible themes. Make some more fields visible. -Couldn't write to disk. Do you have the accurate permissions?: You are trying to save the setting in a file that you don't have write permission to. -The extension is not licensed for use with this ArcView copy: Make sure that the extension is registered for your ArcView GIS serial number.

Copyright 1998-2000, SWEGIS. All rights reserved.

Вам также может понравиться