General Settings Commands

These commands direct the translator to pass information to the client.

In a network service deployment, when a client connects to a translator for the first time the client should request initialization (by sending an init command to the translator). The translator will then send eim data to prepare the client for receipt of graphic data. Such preparation might be to create an atable for the receipt of symbology definitions. The client should request initialization only once in the first session, not in every session.

For single client deployment, client/server or console, the init command is unnecessary, because the translator will initialize the client automatically.

projection and units commands give a hint to the translator as to the projection and units of measure of its data source. This is necessary because some translators have no way of determining this. Quite often however a translator knows already the projection and units relating to its data source in which case these commands are redundant. These commands do not result in a change to the data source, but merely ensure that the translator passes the information back to the client in the output eim data stream, for correct scaling and projection.

The group command directs the translator to mark graphic primitives as belonging to a particular entity group or layer. Such later information is for client use only and has not particular use within the translator.

The ipath command is used by some file-based translators which create Fire entity files to hold symbols. It provides a client directory where such entity files will reside.

With the exception of the init command, these commands can occur in startup scripts, in which case their settings apply to all client sessions. When the commands are used in a client session to a network service, the settings last only until the end of the session.

init

init { <text> }

Request that the translator initialize the client. Some translators can have parameters directing them to use particular initialization options. Most implementations of init have no parameters.

group

group { <client_group> }

Set the destination client group for fetched data.

Tell the translator the “group” for fetched data. The group (or layer) will be a character string which the client will understand. Omitting the parameters will set the group to be "no group".

ipath

ipath { <dir> }

Tell the translator a directory to use if it needs to create Fire instance (.e) files. Some translators use this to create symbols. <dir> is a directory on the client host.

projection

projection { <string> }

Tell the translator the projection of fetched data. The projection will be a character string which the client will understand.

units

units <string>

Tell the translator the units of measure of fetched data. The units will be a character string which the eim library will understand, e.g. “mm”, “m”, “km” etc.

Running example

Startup Script:

# Define the base directory as the arcinfo tree
cd g:/arcinfo
 
# Open a coverage
open brisbane
 
# Turn progress messages on, and quiet mode off for all sessions
progress on
quiet off
 
# Define some default symbology
fillstyle  yellow
textheight 5000
 
# We know the units for the ARC/Info data are meters
units m
 
# Define the default geographic coverage for all Brisbane data
box (6250000,2050000),(6850000,2650000)

Client session 1:

# Initialize (only in the first session)
init
 
# Fetch base polygons (no meta-data)
select from austwater.pat
box (6250000,2050000),(6850000,2650000)
# Draw the polygons with red edges
linestyle red
 
# Add these polygons to the land group
group land
objfetch

Client session 2:

# Fetch town points (with meta-data)
select mctown-id, state from mctown.pat where population > 10000
# Same box still applies
set_class ~arc.mctowns_t
# Provide some statistics about the fetched data
statistics on
# Mark the towns with diamond symbols
markerstyle mk_diamond
markerheight 10000
 
# Add these to the town group
group town
objfetch into mctowns