You are on page 1of 12

Setting up a local coordinate system with an affine transformation.

This document shows how to set up a local coordinate system based on an existing coordinate system
plus an affine transformation. Local coordinate systems can be used for a couple of purposes:

• Provide combined scale factor (CSF) of 1.0 within a project area. This simplifies the handling of
distances, since ground and grid distances will be the same.
• Handle large project areas. For the best existing coordinate system, variations of CSF within
large areas can be significant, and can prevent achieving the required measurement accuracy for
the project. One way to handle this is to subdivide the project area into sub-zones, where the
CSF variability within each zone is acceptable. Each zone would also have its own local
coordinate system.

The following works through an example for setting up a local coordinate system where CSF=1.0 within
the area for a road widening project.

Example Project area:

Corner coordinates (UTM WGS84 Zone 18 North coordinate system, all units in meters):

Corner Easting Northing Elevation


Southwest 508700 5008300 57
Northeast 509800 5010700 57

Suppose also that we want the local coordinate system origin (0.0,0.0,0.0) to be at (508500.0,
5008000.0, 0.0) in the above coordinate system.

Coordinate System info:

UTM Zone 18 North has the following parameters:

Projection Transverse Mercator


Spheroid WGS 84
Datum WGS_1984
Unit of Measurement metres
Central Meridian -75
Latitude of Origin 0
Scale Factor at Origin 0.9996
False Easting 500000
False Northing 0

The combined scale factor at the project centre point (509250.0, 5009500.0, 57.0) is 0.999592.
Worked example:

Step 1: Open AutoCAD Civil3D and identify the built-in Autodesk zone to use as a basis for the local
zone.

In the “Planning and Analysis” workspace, “Map Setup” tab, “Coordinate System” panel, select
“Library”.

In the “Coordinate System Library” dialog, search for the UTM84-18N coordinate system with
the WGS 1984 datum.

Note the EPSG code (32618).

Transformation requirements may vary by project, so the selection of zone, and related datum
should be verified with project survey authorities.
Step 2: Duplicate the zone by selecting it and choosing “Duplicate” at the bottom of the dialog.

The new zone will be created after a slight delay and will have an _1 (or similar) appended to the end of
the zone name, as well as a status icon indicating that it is “User defined”

Step 3: Select the new zone and press the Edit button, which will display the following dialog

Change the code, description and source to reflect meaningful values for the local zone. There are
length limits so keep the values under the limit:

• “Code:” 23 characters
• “Description:” 63 characters
• “Source:” 63 characters
Example:
Step 4: Change the projection settings.

Note the initial values of all parameters, these parameters have been duplicated from the original
coordinate system definition.
Step 5: Change the projection type, to an equivalent projection “with Affine post-processor”. The
“Affine post-processor” will allow local grid conversion parameters. Currently this is only supported for
2 projection types, Transverse Mercator and Lambert Conformal Conic. UTM84 Zone 18N is Transverse
Mercator, so the appropriate projection type is “Transverse Mercator with Affine post processor”
Step 6: Verify that all parameters except for the Affine coefficients are the same as the original
projection. In this case, the Central Meridian, False Easting, and Scale Reduction was not preserved, so
change them back to their original values. (see Coordinate System Info above). As shown in Step 4,
Civil3D does not actually show these parameters for UTM coordinate systems. One way to look them up
is to go to the spatialreference.org website and search for the UTM84-18N coordinate system by EPSG
code (See Step 1).
Step 7: Calculate the Affine parameters and enter the values (see Appendix A for details and formula).

It is recommended to use the full 15 digit precision allowed by the form, in order to get acceptable
accuracy. For this example, 11 digit precision is required to get millimeter accuracy for the northings.

Step 8: On the “Parameters” tab, set the “Useful Range: Geographic” to match the latitude, longitude
extents of the zone (transformed to WGS84)

In this example, these values are not directly provided. These can be determined by transforming the
zone limits (OSGB36) to WGS84 using Map 3D or another tool.

<This example will skip details, as this step is optional>

There are a few reasons to adjust the “Useful Range: Geographic”

• The range determines the extent of Bing Map coverage, local zones are usually much smaller
than the original and this helps to visually detect data that may not be appropriate for the zone.
• Transforming values outside the range will generate warnings (effects depend on product and
workflow).
Step 9: Save the changes. Shut down and restart any Autodesk products.

Restart is needed to ensure that the new definition is read correctly and accessible in all UI.

Step 10: Test the new definition.

Test 1: Quick verification

• Create a new drawing, Assign the CS and Enable Bing Maps display
• Create a rectangle using the local grid extents and verify that the area covered is approximately
correct.
• If Bing Maps do not display, or the coverage is in the wrong area. Verify all calculations and
update the definition.

Test 2: Detailed testing

• Transform known control points or other suitable sample data using the tools available in
Civil3D and Map 3D. Verify coordinates of results.
• In this example, bounding extents are provided in both national grid and local grid and would be
a reasonable starting point.

If changes are necessary, “Remove Location”, save and restart to ensure that the new definition is used
(rather than the one stored in the DWG).
Appendix A: Determining Affine coefficients from the specified Local
Grid formulas and parameters.

As the name suggests, the “Affine post-processor” is applied at the end of the projection formula after
projecting latitude longitude values with the Transverse Mercator projection. Thus, the correct formula
to determine the affine coefficients is the “Formula to convert from the base (e.g. UTM WGS84 Zone
18N) to the local coordinate system”. First, let’s define some terms:

BE – easting of a location in base coordinate system

BN – northing of a location in base coordinate system

LE – easting of same location in local coordinate system

LN – northing of same location in local coordinate system

LOE – local grid origin easting

LON – local grid origin northing. (LOE,LON) in base system is at (0,0) in local system.

DGB - grid distance (in base coordinate system)

DGL – grid distance (in local coordinate system).

DP – ground (physical) distance. In this example, the local coordinate system is being scaled so
that DGL ~= DP within the project area.

CSF – combined Scale Factor for base coordinate system, within project area.:

DGB = DP * CSF.

From our example above:

LOE = 508500

LON = 5008000

CSF = 0.999592

To convert from base to local coordinate system:

LE = (BE – LOE) / CSF

LN = (BN – LON) / CSF

Meaning, the project corner coordinates in the local system are:


Corner Easting Northing Elevation
Southwest 200.082 300.122 57
Northeast 1300.531 2701.102 57

How do these parameters relate to the Affine coefficients?

The Affine coefficients correspond to the following formula (equivalent to a 2D Affine matrix):

_ _ _ _ _ _
|a1 a2 a0 | | BE | | LE |
|b1 b2 b0| * | BN | = | LN |
|_ 0 0 1_| |_ 1 _| |_1_|

or:

_ _ _ _
| a1*BE + a2*BN + a0 | | LE |
| b1*BE + B2*BN + b0 | = | LN |
|_ 1 _| |_1_|

LE = A0 + A1 * BE + A2 * BN

LN = B0 + B1 * BE + B2 *BN.

One way to determine the coefficients is to write the conversion formulas:

LE = (BE – LOE) / CSF

LN = (BN – LON) / CSF

as matrices.

A translation is done first:

_ _
| 1 0 -LOE|
| 0 1 -LON|
|_0 0 1 _|

Followed by a scaling:
_ _
| 1/CSF 0 0 |
| 0 1/CSF 0 |
|_ 0 0 1_|
Giving us:

_ _ _ _ _ _ _ _
| 1/CSF 0 0 | | 1 0 -LOE| | BE | | LE |
| 0 1/CSF 0 |* | 0 1 -LON| * | BN | = | LN |
|_ 0 0 1_| |_0 0 1 _| |_ 1 _| |_1_|

or:

_ _ _ _ _ _
| 1/CSF 0 -LOE/CSF | | BE | | LE |
| 0 1/CSF -LON/CSF | * | BN | = | LN |
|_ 0 0 1 _| |_ 1 _| |_1_|

_ _ _ _ _ _
|a1 a2 a0 | | BE | | LE |
|b1 b2 b0| * | BN | = | LN |
|_ 0 0 1_| |_ 1 _| |_1_|

So:

A0 = -LOE/CSF = -508500/0.999592 = -508707.552681494

A1 = 1/CSF = 1/0.999592 = 1.00040816653195

A2 = 0

B0 = -LON/CSF = -5008000/0.999592 = -5010044.09799198

B1 = 0

B2 = 1/CSF = 1/0.999592 = 1.00040816653195

After substituting the parameters for the desired zone, the affine parameters can be entered into the
definition dialog box.

You might also like