Showing posts with label Bursa-Wolfe. Show all posts
Showing posts with label Bursa-Wolfe. Show all posts

Saturday, November 3, 2007

Axis Order Confusion: Software, Geodesy & Transformations



Axis Order Confusion



Not simply X, Y, Z or N, E, S, W, but how we interpret them and use them in software, geodesy and navigation - it varies and has led to confusion among many people. This is an overview of the systems, the problem and points out things to take note of.



Over time, since the early days of mathematics, and then moving into software development, GIS and internet mapping, axis play an important role, whether it be in datum transformation or even displaying a map.


Is it X,Y,Z or Z,Y,X?


As we know in mathematics, a coordinate system is a system for assigning n-tuple of numbers or scalars to each point in n-dimensional space.



We are familiar with the following coordinate sytems involved in GIS/Mapping and Geodesy:


  • Cartesian coordinate system, which may be called "rectangular", where for 3D space, it uses three numbers representing some distance

  • Polar coordinate systems

  • Curvilinear coordinates, which are based on an intersection of curves


Delving further into Polar coordinate systems, we see the following subtypes:



  • Circular coordinate systems, which is represented by a point in a plane, by an angle, and a distance from the origin

  • Cylinderical coordinate systems which require a point in space, a distance from an origin an a height

  • Spherical coordinate system, which is represented by two angles and a distance from an origin


In mapping and geodesy, we deal quite often with Spherical coordinate systems and often refer to them as Geographic Coordinate Systems.


Ordered Pairs & Coordinate Systems




In GIS software and mapping software, we have three different perspectives for an Ordered Pair (2-tuple). They are in computer science, mathematics and of course Geographical Coordinate Systems.



Let's take a quick look at how these distinct perspectives see the their world:





In computer science and computer graphics, the axis order is (X,Y), where unsigned values increase to the bottom and to the right.



Mathematics sees this world differently for the same axis order (X,Y), where we have signed values increase to the right and upwards.



In the world, where we are most involved, Geographical Coordinate Systems, the axis order varies, sometimes being (X,Y) or (Y,X). The signed values increase upwards and to the right, based on a spheroid, hence we have -180, -90, 180, and 90.



Rotation Confusion as Well - Which Sign is positive?



There are 2 different conventions in use in the survey and mapping industry for defining rotations.



This too has led to considerable confusion in the GIS and mapping world.



Both are valid when used properly.



The two conventions can be referred to as:



1) Position Vector rotation (Commonly referred to as the Busra-Wolfe)


2) Coordinate Frame rotation


This essentially comes down to the left-handed vs. right-handed rotations (see image above) for the various transforms.

But what does this mean with left vs. right? Well, this is one way of determining orientation of axes and direction of rotations.

  • Thumb = Positive X
  • Index up = Positive Y
  • Middle out = Positive Z


Clifford's Point of View

Clifford Mugnier of LSU, whom I met when I lived in Houston, gives a good explanation and way of handling rotations and coordinate systems. His reply can be found here.

My quote follows:

"Probably the best way to document a rotation method is:

use the accepted terms "coordinate frame" and "position vector".

These terms are also used in other disciplines like kinematics (robotics).

But there are more difficulties.One datum transformation method is laid down in the ISO 19111 standard.

This is an approximated 7-parameter Helmert transformation with position vectorrotation. See also ISO/IEC 18026 - Annex B.

PROJ uses about the same method, only the scaling method differs. PROJ does a scalar multiplication, ISO a matrix multiplication.

With the commonly used parameter ranges, the differences between the scaling methods are less than microns, so not important.

As far as I know, the Bursa-Wolfe transform is an approximation to theHelmert transform. The Helmert transform has sines and cosines in therotation matrices, whereas Bursa-Wolfe (and ISO 19111) use the angles themselves (since sin(a) ~ a, sin(a)*sin(b) ~ 0, and cos(a) ~ 1 for small angles).

If you read section B.6 of ISO/IEC 18026, then you'll notice that aBursa-Wolfe transform can be done with a position vector rotation model OR with a coordinate frame rotation model.

Just what one likes the best; be sure to use the correct sign of the rotation angles.

Therefore:

Bursa-Wolfe is NOT equivalent with this or that rotation model.

A well known expert repeatedly states that the Australians use the same datum transform rotation model as the Americans.

This is NOT true!

The order of the rotations differs (XYZ vs. ZYX).

See the Australian GDATechnical Manual.

By the way, if the rotations are approximated, then the order is not important.

Again, the differences in rotation order for real life numbers are literally microscopic."

He clearly points out, and I agree, that it is "silly to refer to a datum transformation method as an American, Australian, European, whatever regional model. If you want to document the way for instance an application transforms,givethe complete formulae, not just an ill-defined name. Why not referring to the EPSG coordinate transformation method numbers? These clearly define the most used datum transformation methods and projection methods."

A simple solution to a complex problem of rotations.

The key is to document and document and be sure to specify what is being done, what axis are being used and let your users know. Do not assume, ask questions, and your life will be easier when dealing with coordinate sytems and rotations.

Or even simplier, as Clifford points out, refer to the coordinate transformation method numbers referenced in the EPSG data and data model for defined coordinate sytems.

Friday, November 2, 2007

EPSG & UKOOA - Defining Co-ordinates in Digital Data Exchange Formats



Introduction to the Offshore



UKOOA and the EPSG have been working together for many years. Through their collaboration, they have developed many standards and UKOOA has been open to listening to the industry about positioning in the North Sea.





When seismic data is acquired, whether it be 2-D or 3-D seismic surveys, the shotpoints (energy source, common mid-point, etc.) need to be positioned or referenced on surface.



Over the years UKOOA has developed various formats, named via a version and a year. This is a short introduction to how these files describe positions in the oil and gas industry.



UKOOA P1/90



Information is described in the Header for the file. The Header records following the convention listed below:



Record Identifer "H" Column(s): 1 Format: A1
Header Record Type 2-3 I2
Header Record Type Modifier 4-5 I2
Parameter Description 6-32 A27
Parameter Data 33-80 Varies



Using the above as a basis, let us take a look at how Datum and Spheroid information is described in this file.



Header records H1600 and H1601 are required for Datum Transformation parameters used by the Bursa-Wolfe Transformation.



Reviewing the Bursa-Wolfe Transformation (as vectors), we see the following:



X DX 1 -RZ +RY X
Y = DY + SCALE * +RZ 1 -RX * Y
Z DZ -RY +RX 1 Z



where

X,Y,Z are geocentric cartesian coordinates defined in metres
DX,DY,DZ are the translation parameters defined in metres
RX,RY,RZ are clockwise rotations defined in arc seconds,
but are converted to radians for use in the formula


SCALE = [1+S. (1oe-6)] where S is in parts per million



The Vertical Datum, is identified by Header record H1700. Some examples of the vertical datum, in relation to offshore work are:



LAT - Lowest Astronomic Tide
MSL - Mean Sea Level
SL - Sea Level
ES - Echo Sounder



The units of measurement are specified in H2001. These should be consistent with the position data. The height unit code will be 1 for metres, 2 for any other unit of measure. Header H2002 specifies the Angular unit code to 1 for degrees, 2 for grads.



Projection Data is specified in Header records H1800 to H2509

Currently, in this older format, the following projection codes were defined and used.



001 - UTM Northern Hemisphere
002 - UTM Southern Hemisphere
003 - Transverse Mercator (North Oriented)
004 - Transverse Mercator (South Oriented)
005 - Lambert Conic Conformal with one standard parallel
006 - Lambert Conic Conformal with two standard parallels
007 - Mercator
008 - Cassini-Soldner
009 - Skew Orthomorphic
010 - Stereographic
011 - New Zealand Map Grid
999 - Any other projection or non-standard variation of the 11 listed above



Since this initial positioning file was developed with the help of surveyors, they planned ahead and answered the question: What happens when we cross the Equator?



When a survey crosses from the South to the North, and the whole survey is shot on a Southern Hemisphere UTM Zone, the coordinates will possibly exceed 9,999,999.9. This is not acceptable in the P1/90 format, so Header record H2600 must indicate that 10,000,000 must be added to the co-ordinates.


More detail about this specification can be found here.





As the industry matures, new versions were released, the next in 1994. This was called p2/94 and was derived for raw marine positioning data.


UKOOA P2/94


During this time, differential positioning with GPS was just being implemented and the industry was beginning to rely on this technique more and more for offshore surveying.


This format is based on UKOOA p2/91 and has extended many of the definitions needed for differential GPS.


As operators maintain and store data in these formats, P2/94 also acts as an archiving format and records information such as the satellite ephemeride, ionospheric conditions and weather/meteorological conditions of the survey.


With the move to P2/94, Geodetic information moved to new headers, and are such described as:


H0100 Magnetic Variation - General Information
H0101 Magnetic Variation - Grid Data
H011# Datum and Spheroid Definitions


where # = 1..9 and is the datum & spheroid number


H0120 Seven Parameter Cartesian Datum Shifts
H0130 Other Datum Shift Parameters
H0140 Projection Type
H0150 (Universal) Transverse Mercator Projection
H0160 Mercator Projection
H0170 Lambert Projection
H0180 Skew Orthomorphic & Oblique Mercator Projection
H0181 Skew Orthomorphic & Oblique Mercator Projection cont.
H0190 Stereographic Projection
H0199 Any other Projection

Satellite System Definitions

H600# Satellite System Description
H610# Definition of Differential Reference Stations
H620# Satellite Receiver Definition
H6300 GPS parameter recording strategy
H6301 DGPS differential recording strategy
H631# GPS clock and ephemerides parameters
H632# GPS ionospheric model & UTC parameters
H6330 Meteorological parameters
H65## DGPS differential correction source defn
H66## DGPS differential correction source defn
H67@0 GPS ellipsoid height estimate


Rotation Conventions


Note that 2 different conventions are in use in the survey industry for defining rotations. This has led to considerable confusion in the GIS and mapping world. Both are valid when used properly.


The two conventions can be referred to as:



1) Position Vector rotation (Commonly used in Europe and referred to as the Busra-Wolfe)
2) Coordinate Frame rotation (Commonly used in North America)

I will talk more about these on a later blog, as it comes into play with a lot of GIS and mapping software.

More detailed information about the P2 format can be found here.


UKOOA P5/94


This version came along to facilitate the exchange of position data for pipelines, flowlines, umbicals and power cables offshore.


In these cases, the data required for pipeline positions are the Latitude, Longitude, Easting, Northing, Depth, and Kilometre Point (KP), along with the standard datum and map projection parameters.


Without wanting to bore my readers with more H records, you can found out more about how the pipelines are stored in this format here.


UKOOA P6/98



In 1998, a new version was developed for 3D seismic surveys and binning.



This is quite complex and would make this short blog even longer, so I'll write about this format at a later date.


The main emphasis of this blog, though, is to show how formats can change over time as technology and data sharing increases. It also points out the importance of knowing the format of your data, especially if you are doing historical work over a region - do not always assume a specific data format. This is partly why the OGP has started the Joint Industry Project I mentioned in an earlier post.


UKOOA P7/2000


Well's deviate. With the advent of horizontal wells and sidetracks, and relating to seismic surveys, we enter a whole other story again.


In this story, as well (bad pun!), we have to consider height measures (such as Kelly-Bushing), and the 4 Norths (which I will explain on a later post).


As this file type would make this blog even longer, I'm going to jump ahead to what the EPSG and UKOOA are doing now in defining the Header records for this specific part of the oil and gas industry.


How the EPSG comes into Play


Turning our eyes to the EPSG in P formatted files, we want to enable integrity checking of co-ordinate system definitions in UKOOA P1, P2, P5 and P6 formats, so a provision is made to describe co-ordinate system by reference to the European Petroleum Survey Group (EPSG) database of geodetic parameters. This is the group of codes we see in use throughout the GIS field and in products such as ESRI and PROJ.4.


What this allows UKOOA to do is to adopt an industry-standard name to be quoted where the geodetic co-ordinate system used is a common system. Defining parameters and units are then as given by EPSG and are not strictly required to be explicitly given in the P-format records.


As an integrity check, it is considered good practice also to include the explicit definition .The new records which can be used as extensions within the P1/90, P2/94, P5/96 and P6/98 formats are:



H8000 EPSG Geographic CS Name
H8001 EPSG Geographic CS Code
H8002 EPSG Projected CS Name
H8003 EPSG Projected CS Code
H8004 EPSG Vertical CS Name

H8005 EPSG Vertical CS Code
H8006 EPSG Database Version



As we know, co-ordinate systems may be two- or three- dimensional.


A vertical co-ordinate system is one-dimensional.


For the P1, P2 and P5 formats:



the H8002, H8003 and H8006 records are required when latitude, longitude, easting and northing but no height or depth are given;


the H8002, H8003, H8004, H8005 and H8006 records are required when latitude, longitude, easting, northing and gravity related height or depth are given;


the H8000, H8001, H8002, H8003 and H8006 records are required when latitude, longitude, easting, northing and ellipsoidal height or depth are given.



For the P6 format, the H8002, H8003 and H8006 records are required.



That is the way UKOOA and the EPSG see the offshore world when it comes to positioning and exploration in the North Sea and elsewhere.


Exploration & Production Blog


If you are interested, I also write another blog on the oil and gas industry, mainly describing where exploration is occurring, the technology being used, history of a region, some geology, etc. and some aspects of the UN Convention on the Law of the Seas.


The blog is located here.

Enjoy!