Introduction to ArcPlot and AML 11/6/2015 – UT Dallas POEC 6382 Applied GIS Software.
Download ReportTranscript Introduction to ArcPlot and AML 11/6/2015 – UT Dallas POEC 6382 Applied GIS Software.
Introduction to ArcPlot and AML
4/23/2020 – UT Dallas POEC 6382 Applied GIS Software 1
5 Steps to Create a Map in ArcPlot
• Indicate the display method for the map -- on the computer screen or on a graphics plotter.
• Specify parameters about the size and layout of your map to translate coverage features from the computer to the display surface. These include the final size of the printed map, the position of the geographic features on the map, and the scale of the map.
• Specify the portion of the Earth’s surface to include in your map.
• Draw the geographic features you want on your map, and specify which symbols to use for drawing and labeling them.
• Add additional cartographic elements to make your map easier to read and understand. These include titles, legends, scale bar, north arrow, and graphics.
2 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Establishing the Display Environment
Commands in Arc/INFO that use menus and display graphics on the screen (such as in ArcPlot or ArcEdit) require you to establish the display environment. DISPLAY: The command DISPLAY controls whether graphics are sent to your workstation’s display (9999) or to a graphics file (1040).
&TERMINAL: the directive &TERMINAL is required to invoke any AML menus during your session.
You can set these parameters interactively at the beginning of an ArcPlot session, or store them in a station file. Station files are text files with “stat_” prefix, for example, stat_9999 In Arc/INFO specify your devices and display parameters: 1. Interactively display 9999 3 &term 9999 2. With a station file &station 9999 1
Display options
2 3 4 3 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Optional Directive
&fullscreen controls screen output of text by certain commands.
Usage: &FULLSCREEN <&ON | &OFF | &NOPAGING | &POPUP > &ON - enables &FULLSCREEN mode. This is the default.
&OFF - disables &FULLSCREEN &NOPAGING or &POPUP mode.
&NOPAGING - enables &FULLSCREEN mode; however, text scrolls by through the dialog area or popup window without paging.
&POPUP - displays dialog in a scrollable window.
POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas 4
Getting Help
ARCPLOT contains more commands than any other ARC/INFO program. • Get a complete listing of commands with COMMANDS: – Arcplot: commands • Get a listing of commands using a partial name: – Arcplot: commands text (will return all commands starting with text) • Get a listing of commands using a wild card: – Arcplot: commands *spot (will return all commands with “spot” at end) • Get command usage: – Arcplot: usage arclines • Start ArcDoc for online documentation: – Arcplot: help 5 4/23/2020 – UT Dallas POEC 6382 Applied GIS Software
ymax
Layout
width Graphics Page = pagesize maplimits height ymin 4/23/2020 – UT Dallas xmin xmax POEC 6382 Applied GIS Software 6
Page Units versus Map Units
• PAGE UNITS are the units of measurement for the graphics page, usually given as inches (default) or centimeters.
• MAP UNITS are based on the real world coordinate system (projection) of the coverage(s) being displayed. They are nearly always specified in meters or feet.
• Some graphics commands (for example,
BOX, CIRCLE
, and
LINE
) can draw features based on either the currently set page units or map units. The command to switch between these units in Arcplot is
UNITS
.
– Arcplot: units page – Arcplot: units map 7 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Layout Commands: Graphics Page
• • • The graphics page is that part of your device display canvas where graphics can be drawn. By default, this is the entire display area.
PAGEUNITS
: Specifies what coordinate units will be used to specify location points on the device display page.
– Arcplot: pageunits
PAGESIZE:
The graphics page area can be specified with the PAGESIZE command. All ARCPLOT graphics will be clipped to this page dimension. – Arcplot: pagesize < device | width height> – The page size default is the device display page. – PAGESIZE sets the width and height of the graphics page in the current PAGEUNITS.
– In this way, you can design a large map on a small screen (and of course, when you output the final map, the hardcopy is at the correct larger format).
PAGEEXTENT
: Portion of the graphics page to be displayed. – By default, PAGEEXTENT is set to the current graphics page size.
8 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
• • •
Layout Commands: Map
MAPUNITS
: tells ArcPlot what coordinate units the coverages you will be drawing are stored in. Default is inches.
– Arcplot: mapunits meters
MAPLIMITS
: specifies the area on your graphics page where data is drawn.
– By default, the entire PAGESIZE is used .
– Given in page units: Arcplot: maplimits xmin ymin xmax ymax – If you don’t specify a scale for your map (MAPSCALE), the data will draw to fit neatly inside your specified MAPLIMITS area.
MAPEXTENT
: specifies the geographic area in real-world coordinates that will be represented on your map. – The map extent
must
be specified. There is no default MAPEXTENT.
– Use a single coverage – Use multiple coverages Arcplot: mape texas Arcplot: mape tx ok ar – Use coverage features – Use map coordinates – Use interactive coordinates Arcplot: mape polys states Arcplot: mape xmin ymin xmax ymax Arcplot: mape * 9 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Layout Commands: Map, pg 2
• • •
MAPSCALE:
used to specify the denominator of the scale to draw the map. You should use the MAPUNITS command before using MAPSCALE if the coordinate units are different from the default inches. If you do not set a MAPSCALE, ARCPLOT will draw the map as large as possible within the available graphics page or MAPLIMITS by taking the maximum dimension of the map and scaling it to the maximum dimension of MAPLIMITS or the graphics page.
– Arcplot: mapscale 24000 (for a 1:24000 scale map)
MAPSHIFT
: will shift the map from the lower left corner of the map to the specified position. Use this command instead of MAPLIMITS if you also use the MAPSCALE command.
– Arcplot: mapshift
MAPPOSITION
: When coverage features are drawn inside the area specified in MAPLIMITS, they are automatically positioned so that the lower left corner of the area to be drawn is placed at the lower-left corner of the MAPLIMITS. If you do not want this, use MAPPOSITION command.
10 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Executing MAP-to-PAGE Transformation
• If you want to make a graphics file where the map extent of a coverage fits exactly within a specified area of the page, use
PAGESIZE, MAPEXTENT
, and
MAPLIMITS
.
• If you want to make a graphics file at an exact map scale, use
PAGESIZE, MAPEXTENT, MAPSCALE
and
MAPSHIFT
.
• Getting Map-to-page information To find the current settings use: – Arcplot: mapinfo - returns a report with all units specified – Arcplot: show
Cartography
Cartographic design uses symbology and typography to convey information that is both easily understood and visually appealing to the map reader.
• Geographic features – polygons - may be shaded, patterned, or displayed as outlines, choice of color, width – arcs - choice of line color, width, symbology – points - choice of color, marker type, size – labels - choice of font, color, size, placement • Cartographic features – title - choice of font, color, size, placement – graphics - choice of color, placement, width – legends - need to be represent geographic features – N. arrows - choice of style, placement, size – scale bars - choice of style, placement, size, color 12 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Using Symbology in ArcPlot • Types of Symbols
: – MARKER: for displaying points – LINE: for displaying arcs or outlines – SHADE: for filling in polygons – TEXT: for displaying annotation or text captions and titles 4/23/2020 – UT Dallas POEC 6382 Applied GIS Software 13
Symbolsets in ARCPLOT
• ARCPLOT comes with a set of ready-to-use default symbolset files that are automatically read into ARCPLOT whenever you start a session. These files are
plotter.lin, plotter.mrk, plotter.shd and plotter.txt
. Each set features 100 symbols, made up of 25 different patterns in the four hardware default colors 1 to 4. You can use any symbol in the default symbolset file by specifying its number, 1 to 100 • These are the first four symbols in each plotter symbolset: • 1 = white on black background, black on white background (default) • 2 = red • 3 = green • 4 = blue • The default sets are especially useful for maps that will be drawn on four-color plotters. • For example, in the default line symbolset, 31 is a green, dashed line 0.05 inches wide.
14 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
• • • • •
Setting Symbol Sets
Sample of symbolsets available (some are hardware device dependent): – plotter – calcomp (plotter.lin, plotter.mrk, plotter.shd and plotter.txt) – carto – color (provides 16 colors for each type symbol) – colornames You can change symbol sets from the default “plotter” set by loading another set – ArcPlot: markerset
Specifying Symbols
• You can set a fixed symbol for drawing coverage features by referencing a symbol number: – ArcPlot: markersymbol
Example – Arcplot: lineset carto.lin
– Arcplot: linesymbol 110 These commands set the current line symbol to be a black dashed line with a medium thickness.
• You can use the commands MARKERPUT, LINEPUT, SHADEPUT and TEXTPUT to temporarily assign the “current” symbol to another number: – Arcplot: linesymbol 110 – Arcplot: Lineput 1 Thus: linesymbol 110 has now (temporarily) replaced linesymbol 1 1 is the current line symbol number however, symbol # 110 will be used The lineset command will need to be re-issued to return to the original setup.
See the discussion of CLASS command for an application. 4/23/2020 – UT Dallas POEC 6382 Applied GIS Software 16
Color
• You can override the color properties for the current symbol with these commands – ArcPlot: markercolor
17 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Other Symbol Properties
• SCALE: Symbol scales are set by default in page units. Can scale up or down. For example, scale factor of 2.0 would cause symbols to draw at twice their normal size, 0.5 for half. – Arcplot: markerscale
– Arcplot: linesize
– Arcplot: markerangle < angle | *> • Text - have a variety of options: – textquality: – textfont: – textstyle: – textjustification: constant or proportional Times, Courier, Helvetica, etc. underlined, italic, bold LL, LC, LR, etc.
18 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Symbol Editors
• Four symbol editors provide a graphic interface that allows you to quickly choose and modify a current symbol, edit an existing symbol, or create new symbols and symbolsets.
• To access each editor – Arcplot: – Arcplot: – Arcplot: – Arcplot: lineedit markeredit shadeedit textedit • Check your current symbols with the SHOW command – Arcplot: show markersymbol – Arcplot: show markercolor – Arcplot: show linesize – Arcplot: show shadecolor 19 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Drawing Coverage Features
• Points – Arcplot: points
• Arcplot: pointmarkers manholes 2 (red cross) • Arcs – Arcplot: arcs
Drawing Coverage Features, page 2
There are three ways to select the symbol(s) to be used for drawing:
• Use one symbol to draw all features in a coverage – Arcplot: arclines roads 2 (red line) or – Arcplot: linesymbol 2 or linecolor 2 – Arcplot: arcs roads • Use more than one symbol to differentiate coverage features by using an attribute value stored within the feature attribute table: Roads# Roads-id Rd-code 1 2 1 1 2 2 3 4 3 4 1 2 – Arcplot: arclines
21 POEC 6382 Applied GIS Software
Drawing Coverage Features, page 3
• Use more than one symbol to differentiate coverage features by using a
lookup table
. A lookup table is an INFO data file that contains two items, one is defined and named the same an an item in the feature attribute table, and the other item is named SYMBOL.
Roads# Roads-id Rd-code 1 2 1 1 2 2 roads.aat = Feature Attribute Table 3 4 3 4 1 2 Rd-code Symbol 1 6 2 78 roads.lut = Lookup Table – Arcplot: arclines
• The lookup table contains one record for each different value on the item variable 22 4/23/2020 – UT Dallas POEC 6382 Applied GIS Software
Drawing Legends
• To display a legend, a key legend file must be created. • A key legend file is a text file created using the text editor of your operating system. • The file defines what to display in the legend - you must specify each legend symbol, by number, along with its descriptive text.
– Example road surface file: The first line specifies line symbol .6
Improved .78
number 6 as the first symbol in the legend Always precede the symbol number by a period (.). The next line specifies the Semi-improved • Commands: – Keybox – Keyposition text associated with the symbol.
Naming convention
specify dimensions of the symbol in the key specify location (upper left) on the page – Keyline, Keymarker, Keyshade: draw the legend key 23 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Adding Map Elements
• Graphic Elements – Graphic elements can be added with the line, box, circle, patch, shade or marker commands, for example • Arcplot: box <* | xmin ymin xmax ymax > • North Arrow – The easiest way is to add a marker from a markerset provided with Arc/INFO called north.mrk: • Arcplot: • Arcplot: • Arcplot: • Arcplot: markerset north.mrk
markersymbol 12 markersize 1.5
marker <* | xy > (in pageunits) • Scale Bar – Scale bars require the correct dimensions to provide an accurate scale reference. You may want to develop an AML to provide this functionality, or simply use a text scale such as 1:24000.
24 4/23/2020 – UT Dallas POEC 6382 Applied GIS Software
Adding Map Elements, page 2
• Text - Before adding text, set your text symbols and properties -- there are 28 commands for text style, alignment, font, etc. Arcplot: commands text – Placing text requires you to move to the location at which you wish to place text with the MOVE command: Arcplot: move < * | xy > – Specify the text to be added: Arcplot: text
Arcplot: textsymbol 3 Arcplot: textsize .35
Arcplot: textjustification ur (upper right) Arcplot: move 5.5 0.625
Arcplot: text ‘Demonstration Map of Downtown Santa Fe’ It’s a good idea to to repeat these for every text item since they become the default until changed. Analogous commands exist for marker, line, shade -markerset, markersysmbol, etc. lineset, linesymbol, etc.
25 4/23/2020 – UT Dallas POEC 6382 Applied GIS Software
Classification
• Class establishes a numeric classification used to assign symbols to coverage features or events when they are drawn.
– CLASS
– CLASS MANUAL
• Arcplot: class manual 3 10 100 • Arcplot: class manual 5 50000 75000 100000 200000 Classes are assigned the numbers 1,2,3 etc 26 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Creating a Shaderamp
• After the command for classification, you can select colors to represent each of these classes with the following code: Shadeset colornames shadecolor
– shadesave saves the current shade symbols to a shadeset file or template file that can be used in future Arcplot sessions; not needed if only need this set (defined with shadeput) for this session.
• To use a color ramp – SHADECOLORRAMP
Mapping Graduated Points: Ex 1
The code below, executed in arcplot, assumes a point coverage called
city
containing a variable called
pop2000
. This variable will be divided into 3 classes with limits at 500,000 and 1,000,000. These classes will automatically be labelled 1,2,3. Markerput assigns a selected symbol to each of these classes, which are then displayed with the pointmarkers command. (The initial readselect command, discussed in coverages lecture, simply limits records to Texas cities.) Readselect txcity.sel
Markerset plotter.mrk
markersymbol 81 markerput 1 markersymbol 82 markerput 2 markersymbol 83 markerput 3 class manual 3 500000 1000000 pointmarkers city pop2000 28 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Mapping Graduate Points: Ex 2
• • • • • • • • • • • • • • Another way to create graduated points in ArcPlot is by using RESELECT to make repeated selects and mapping each. Readselect txcity.sel
reselect city point pop2000 le 500000 markersymbol 81 points city clearselect readselect txcity.sel
reselect city point pop2000 gt 500000 and pop2000 le 1000000 markersymbol 82 points city clearselect readselect txcity.sel
reselect city point pop2000 gt 1000000 markersymbol 83 points city 29 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
•
Using AML in ArcPlot:
Creating a Watch File
Commands entered during an Arcplot session are not saved unless you either create a “watch” file or duplicate the commands in a text file, or AML. Using the AML saves time because you can repeatedly run the set of commands instead of typing the commands in again each time. You can modify the commands in the AML until you are happy with the results. • To capture the commands in a watch file during the ARCPLOT session and then convert them into an AML macro file when you are done: – Step 1: Open a watch file • Arcplot: &watch usa.watch
– Step 2: Enter commands to be captured • Arcplot: display 9999 • Arcplot: &term 9999 • Arcplot: mape ………...
– Step 3: Close the watch file • Arcplot: &watch &off – Step 4: Convert the watch file to an AML file • Arcplot: &cwta usa.watch usa.aml
– Step 5: Run AML in ARCPLOT • Arcplot: &run usa.aml
4/23/2020 – UT Dallas POEC 6382 Applied GIS Software 30
Using AML in ArcPlot, pg 2
• • Unfortunately, the above process of automated AML creation does not work well ‘cos of the extra “junk” in the watch file which is not removed – Its better to type the commands into a text file using a word processor!
Comment lines out of an AML with /* • “Debug” an AML with: &echo &on; – turn echo off with: &echo &off • You can use AMLs to automate and standardize the map production process. For example, you may have a standard map layout format to which you want all your organization’s ARCPLOT maps to conform. You can create one basic macro that stores the commands that draw this template layout. This macro can then be used in each ARCPLOT session to generate an entire series of maps. 31 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Minimum Commands to Display a Coverage
1. Specify your devices and display parameters: Arc: display 9999 Arc: &term 9999 2. Start ArcPlot Arc: ap 3. Set the map extent to the coverage Arcplot: mape states 4. Draw the coverage features Arcplot: arcs states (will draw with default symbol 1) Arcplot: polys states To clear your screen, give the command CLEAR; clear does not remove your most recent drawing specifications (in this case, mape and linecolor) 32 4/23/2020 – UT Dallas POEC 6382 Applied GIS Software
Display Alternatives
Initiate plotting Arc: arcplot Arcplot: display 9999 Arcplot: mape
(the “s” is required on all these)
• For vector (shaded/differentiated) Arcplot: pointmarkers
Zooming In
• Zoom functionality consists of resetting the mapextent, and redrawing the map .
– Arcplot: mape europe – Arcplot: arcs europe – Arcplot: mape * – Arcplot: clear (use cursor to drag box of area to zoom to) – Arcplot: arcs europe • To return to original mapextent give the command for the original mapextent – Arcplot: mape europe • To record mapextent coordinates in an AML if the cursor defines the location, use the SHOW MAPE command.
34 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Creating a graphics file
• • While designing your map you will be working with your map as a display on the computer screen. When finished, you can create a digital file of the map, known as a
graphics file
Change the line in your AML that specifies the device: • from: • to: display 9999.
display 1040 Then add the output file path and name immediately below this • c:/usr/myname/map1.gra
(or just the name to put in same directory) At the end of of the aml, add the command
quit
• Quit to close the .gra file – Re-run your AML to create the graphics file; you will not see a map on your screen during this process.
– To see your output on screen, at the Arc prompt • Arc: draw map1.gra 9999 • In addition to the Arc/INFO default graphics file, optional output file formats include PostScript, Adobe Illustrator, and CGM.
35 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Printing Hard Copy
• • • • • • • Basic approach is similar to creating a graphics file: – Create print file from an aml – Send print file to printer to produce a print file in enhanced metafile format (.emf) from an existing aml 1. add "quit" command at end of aml to close .emf file – .emf file will not be created otherwise 2. "comment out" any
display 9999
commands – Otherwise output goes to screen not print file 3. insert the two commands below – display 1040 8 – myprint.emf
(often, you simply “uncomment” these lines) 4. run the aml (which will create a file called
myprint.emf
) 5. go to the menu where you started ARC, and start the print utility 6. select desired printer, and be sure to specify landscape or portrait mode as appropriate 36 POEC 6382 Applied GIS Software 4/23/2020 – UT Dallas
Running a Sample AML for Arcplot
• A sample aml is available as follows: – P:\p6382\ex2\giscity.aml
• Copy this aml to your own workspace (e.g. c:\usr\xxx) • Run the aml – &term 9999 (only needed once—sets up aml environment) – &echo &on (messages routed to screen to help in de-bugging) – &run giscity.aml
• Make changes to aml, and run again 4/23/2020 – UT Dallas POEC 6382 Applied GIS Software 37