Compression Control Commands

These are commands to set compression and optimize eim packet size. This is necessary when running in network service mode to minimize network traffic.

These commands can occur in startup scripts, in which case they apply to all client sessions. When compression commands are used in a client session to a network service, the settings last only until the end of the session.

generalize

generalize { <tolerance> { <units-string> } }

Set vector generalization. This enables a level of detail to be specified, reducing the number of vertices sent to the client. Typically when polyline or polygon data is too fine for the client, an approximation tolerance is provided. The tolerance should be in the units of measure of the data source being fetched, although a units string may be specified if this is not known. Omitting the parameters will turn vector generalization off.

pcompress

pcompress { <level> { <size> } }

Set the general packet compression level (0 through 9) and size (network service mode only). Default is 0 (no compression). Level 9 is the maximum compression but also takes the longest time to compress. 3 is a good value to use. <size> provides a buffer size used during the compression process. This can be omitted in most cases and the system will choose a suitable size. Omitting both parameters will turn packet compression off.

vcompress

vcompress { i2 | i4 | r4 | r8 } { 2d | 3d }

Set vector compression packing and dimensionality. This defines how polygon and polyline data is packed to reduce network traffic.

The use of i2, i4 and r4 packs points from doubles into 2-byte integers, 4-byte integers or 4-byte floats with a necessary loss of precision. r8 (the default) does no packing at all.

The use of 2d assumes a constant Z co-ordinate data, e.g. 2-D plan data, and removes all Z values except that of the first vertex in a polygon/polyline. 3d (the default) does not remove Z co-ordinate values unless all co-ordinates have a Z value of 0, in which case 2d is used.

packet

packet <n>

Set the packet buffer size. The default is 16384. This determines how often eim data packets are sent to the client during fetch operations. When an eim packet reaches this size the eim stream will be flushed and sent to the client. This enables performance tuning.

Running example

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
 
# Set vector generalization to reduce vectors of length 5 km or less
generalize 5 km
 
objfetch