WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

Transforming coordinates for your areas

This topic explains how to transform coordinates so that an area displays properly on the Spatial Management Client.

Usually the map on the Spatial Management Client relates to the coordinate system of the event provider (hub) in such a way that the logical 0.0 point is either in the bottom left or top left corner (abstracting from the offset). In those cases it would be sufficient to define a scaling factor when defining the area and X and Y offsets. If your default 0.0 is in the top left corner and you want to change it to the bottom left, specify cartesian when defining the area.

The detailed information in this topic is necessary for more complex situations, where one hub is related to different maps with various orientation, overlap, and so on.

There can be up to three types of coordinate systems in an Location Awareness Services for WebSphere® Premises Server environment:
  1. The systems defined by the location event providers.
  2. The systems defined by Location Awareness Services for WebSphere Premises Server in the Spatial Management Client. The point of origin of the coordinate system defined by the Spatial Management Client is the upper-left corner, with the Y-axis pointing downwards and the X-axis pointing to the right.
  3. Logical reference systems.

The following figure shows a simple scenario that demonstrates why at least one coordinate transformation is required in almost all cases.

Image depicting the coordinate system used in Location Awareness Services for WebSphere Premises Server

The point has coordinates 20, 20 in the location event provider coordinate system. These coordinates must be translated to Spatial Management Client coordinates which are 7, 21 in this sample. Depending on the complexity of the setup, separate logical reference systems might be needed. In many cases, such as in the sample illustrated here, a system defined by the location event provider or the Spatial Management Client can be used as a reference system. In some setups, the systems might even be identical.

When the systems are identical, no coordinate transformation is needed. If either system acts as a reference system, one coordinate transformation must be made. If there is a separate reference system, two transformations must be made: one between the location event provider and the Location Awareness Services for WebSphere Premises Server server and one between the Location Awareness Services for WebSphere Premises Server server and the Spatial Management Client.

Processing coordinates

Location events from location event providers are processed by Location Awareness Services for WebSphere Premises Server and transformed as required:
Network diagram depicting the process of coordinate transformation in Location Awareness Services for WebSphere Premises Server
  1. Coordinates from a location event provider are transformed before they are stored in the Location Awareness Services for WebSphere Premises Server database.
  2. Internal server side processing, such as location checking, is based on those normalized coordinates.
  3. Location Awareness Services for WebSphere Premises Server also transforms tag positions when sending them to the Spatial Management Client.

Configuring coordinate transformations

The location event provider transformation rules are specified in the Location Awareness Services for WebSphere Premises Server Administrative Console, specifically in the Event Provider portlet. In the Coordinate Transformation section of the Details view you can supply values for the following base transformation operations:
  • Horizontal Rotation: Rotates the X-Y plane around the point of origin.
  • X-Y Permutation: Permutates, or switches, the X and Y axis.
  • X Offset: Displaces the area in the X direction.
  • Y Offset: Displaces the area in the Y direction.
  • Scaling: Scales the area to a larger or smaller size.

The transformations apply only to the X and Y coordinates. There is no need for three dimensional transformations because all components can be configured so that the Z-axis of their coordinate systems points upward.

The following samples show the effects that different values have.

Input coordinates are transformed based on the values of the listed parameters. Input coordinates (X,Y,Z) are converted to (X’,Y’,Z’) according to the following rules:
  • X' =
    • Scaling * (X * cos(HorizontalRotation) + Y * sin(HorizontalRotation)) + XOffset (if X and Y axis are not permuted)
    • Scaling * (-X * sin(HorizontalRotation) + Y * cos(HorizontalRotation)) + YOffset (if X and Y axis are permuted)
  • Y' =
    • Scaling * (-X * sin(HorizontalRotation) + Y * cos(HorizontalRotation)) + YOffset (if X and Y axis are not permuted)
    • Scaling * (X * cos(HorizontalRotation) + Y * sin(HorizontalRotation)) + XOffset (if X and Y axis are permuted)
  • Z' = Scaling * Z (sin() and cos() are the standard trigonometric functions)
In the Spatial Management Client, you cannot configure horizontal rotation and axis permutation. However, you can specify the following base transformations when you define a new area in the Preferences Administration GUI:
  • X Offset value: Displacement in X direction.
  • Y Offset value: Displacement in Y direction.
  • Area scale: Scaling factor.

As a consequence, areas must be aligned with either the location event provider's coordinate system or the intermediate reference system.

Location event provider and area configurations

The following figures show the different location event provider and area configurations that can occur. The location event provider-defined coordinate system is depicted in light gray and the coordinate system defined in the Spatial Management Client for the area is in blue.

Figures A through D show different scenarios of coordinate systems.

Scenarios A and B depict a single location event provider configuration and scenario C depicts a configuration where all location event providers refer to the same coordinate system.

In scenarios C and D, the X and Y axes of all areas must be aligned. In other words, the X axis of each area must point in the same direction and the Y axis of each area must point in the same direction.

The following table summarizes the scenarios depicted above and shows which system should be used as a reference system:
Case Location event providers Area Reference system Comment
A 1 1 Location event provider or Spatial Management Client When the Spatial Management Client is used frequently by multiple users, use the GUI's coordinate system as the reference. In all other cases, use the location event provider's coordinate system to reduce the number of transformations.
B None 1 Spatial Management Client  
C 1 None Location event provider  
D None Multiple Separate reference system The separate coordinate system can coincide with the coordinate system of the location event provider, the Spatial Management Client, or both.

In scenarios A, B, and C, a separate reference system can also be used. However, doing so increases the number of required transformations.

Transformation samples

The following figures show some basic transformation scenarios. The original coordinate system is labeled with a "1", such as X-1, Y-1. The target system is labeled with a "2", such as X-2, Y-2. The scaling factor depends on the base units of both systems. The configuration settings are shown in the tables.

Table 1. Sample 1
Configuration setting Value
Rotation 0
X-Y permutation No
X-offset dx
Y-offset dy
A graph showing original and target coordinate systems
Table 2. Sample 2
Configuration setting Value
Rotation 0
X-Y permutation Yes
X-offset dy
Y-offset dx
A graph showing original and target coordinate systems
Table 3. Sample 3
Configuration setting Value
Rotation 90
X-Y permutation No
X-offset dx
Y-offset dy
A graph showing original and target coordinate systems
Table 4. Sample 4
Configuration setting Value
Rotation 90
X-Y permutation Yes
X-offset dy
Y-offset dx
A graph showing original and target coordinate systems
Table 5. Sample 5
Configuration setting Value
Rotation 180
X-Y permutation No
X-offset dx
Y-offset dy
A graph showing original and target coordinate systems
Table 6. Sample 6
Configuration setting Value
Rotation 180
X-Y permutation Yes
X-offset dy
Y-offset dx
A graph showing original and target coordinate systems
Table 7. Sample 7
Configuration setting Value
Rotation 270
X-Y permutation No
X-offset dx
Y-offset dy
A graph showing original and target coordinate systems
Table 8. Sample 8
Configuration setting Value
Rotation 270
X-Y permutation Yes
X-offset dy
Y-offset dx
A graph showing original and target coordinate systems

The transformation shown in the last sample occurs frequently in Location Awareness Services for WebSphere Premises Server configurations. The target coordinate system is like that defined by the Spatial Management Client, with the point of origin in the upper-left corner, with the Y axis pointing downward, and the X axis pointing to the right.


Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.