Type: Package
Title: Conversion Tools for HK80 Geographical Coordinate System
Version: 0.0.2
Date: 2016-07-25
Author: Jinlong Zhang [aut, cre]
Maintainer: Jinlong Zhang <jinlongzhang01@gmail.com>
Description: This is a collection of functions for converting coordinates between WGS84UTM, WGS84GEO, HK80UTM, HK80GEO and HK1980GRID Coordinate Systems used in Hong Kong SAR, based on the algorithms described in Explanatory Notes on Geodetic Datums in Hong Kong by Survey and Mapping Office Lands Department, Hong Kong Government (1995).
License: GPL-2
URL: https://github.com/helixcn/
NeedsCompilation: no
Packaged: 2016-07-25 15:57:55 UTC; jinlong
Repository: CRAN
Date/Publication: 2016-07-25 20:31:06

Conversion Tools for HK80 Geographical Coordinate System

Description

Conversion and Reverse Conversion between HK80 Geographical Coordinate System and WGS84 based Geographical Coordinate Systems.

Details

Package: HK80
Type: Package
Version: 0.0.2
Date: 2016-07-26
License: GPL-2

This package provides functions for converting the coordinates between WGS84UTM, WGS84GEO, HK80UTM, HK80GEO and HK1980GRID Coordinate Systems used in Hong Kong SAR, based on the algorithms described in Explanatory Notes on Geodetic Datums in Hong Kong by Survey and Mapping Office Lands Department, Hong Kong Government (1995).

Author(s)

Jinlong Zhang

Maintainer: Jinlong Zhang <jinlongzhang01@gmail.com>

References

Survey and Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

Examples

### Conversion between HK1980GRID and WGS84UTM
options(digits = 15)
HK1980GRID_TO_WGS84UTM(820351.389, 832591.320)

#### $N
#### [1] 2471278.72371238
#### 
#### $E
#### [1] 205493.220852789
#### 
#### $zone
#### [1] 50

#### Answer from the online conversion tool
#### at: http://www.geodetic.gov.hk/smo/tform/tform.aspx
#### 2471279, 205494


Convert HK1980GRID coordinates to HK80GEO coordinates

Description

Convert HK1980GRID coordinates to HK80GEO coordinates

Usage

HK1980GRID_TO_HK80GEO(N, E)

Arguments

N

Numeric, Northern coordinate in meters

E

Numeric, Eastern coordinate in meters

Details

This function uses equation 3, 4, 5 to convert the HK1980GRID coordinates into HK80GEO coordinates. More details could be found on the explanatory notes Page C9.

Value

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK80GEO_TO_HK1980GRID

Examples

options(digits = 15)
HK1980GRID_TO_HK80GEO(820351.389, 832591.320)

### $latitude
### [1] 22.3237017196981
### 
### $longitude
### [1] 114.138734989417

#### The answer from the online conversion tool
### 22.323701767
### 114.138734989


Convert HK1980GRID coordinates to HK80UTM coordinates

Description

Convert HK1980GRID coordinates to HK80UTM coordinates

Usage

HK1980GRID_TO_HK80UTM(N, E)

Arguments

N

Numeric, Northern coordinate in meters

E

Numeric, Eastern coordinate in meters

Details

This function converts the HK1980GRID coordinates into HK80GEO coordinates (latitude and longitude) first, and converts the later into HK80UTM coordinates.

Value

N

Northern coordinate in meters

E

Eastern coordinate in meters

zone

UTM zone number, either 49 or 50

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK80UTM_TO_HK1980GRID

Examples


##### This function was not tested since 
##### the conversion is not available on the manual nor online.
options(digits = 15)
HK1980GRID_TO_HK80UTM(832699, 836055)

Convert HK1980GRID coordinates to WGS84GEO coordinates

Description

Convert HK1980GRID coordinates to WGS84GEO coordinates

Usage

HK1980GRID_TO_WGS84GEO(N, E)

Arguments

N

Numeric, Northern coordinate in meters

E

Numeric, Eastern coordinate in meters

Details

This function converts the coordinates to HK80GEO first, and convert the later to WGS84GEO coordinates.

Value

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

WGS84GEO_TO_HK1980GRID

Examples

options(digits = 15)
HK1980GRID_TO_WGS84GEO(820351.389, 832591.320)
#### $latitude
#### [1] 22.3221739419203
#### 
#### $longitude
#### [1] 114.141179433862

####  Answer from the online conversion tool
####  http://www.geodetic.gov.hk/smo/tform/tform.aspx
####  22.322172084 	114.141187917

Convert HK1980GRID coordinates to WGS84UTM coordinates

Description

Convert HK1980GRID coordinates to WGS84UTM coordinates

Usage

HK1980GRID_TO_WGS84UTM(N, E)

Arguments

N

Numeric, Northern coordinate in meters

E

Numeric, Eastern coordinate in meters

Details

This function converts the HK1980GRID coordinates to HK80 geographical coordinates (latitude and longitude ) first, and then converts the later to HK80UTM coordinates, and eventually converts the HK80UTM coordinates to WGS84UTM.

Value

N

Northern coordinate in meters

E

Eastern coordinate in meters

zone

Zone

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

WGS84UTM_TO_HK1980GRID

Examples

options(digits = 15)
HK1980GRID_TO_WGS84UTM(820351.389, 832591.320)

#### $N
#### [1] 2471278.72371238
#### 
#### $E
#### [1] 205493.220852789
#### 
#### $zone
#### [1] 50

######################################
#### Answer from the online Conversion tool
#### http://www.geodetic.gov.hk/smo/tform/tform.aspx
#### 50Q 	2471279 	205494


Convert the HK80GEO coordinates to HK1980GRID coordinates

Description

Convert the HK80GEO coordinates to HK1980GRID coordinates

Usage

HK80GEO_TO_HK1980GRID(latitude, longitude)

Arguments

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Details

This functions uses equation 1,2,3 in the explanatory note (page C9) to convert the HK80GEO coordinates into HK1980GRID coordinates.

Value

N

Northern coordinate in meters

E

Eastern coordinate in meters

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK1980GRID_TO_HK80GEO

Examples

options(digits = 15)
HK1980GRID_TO_HK80GEO(820351.389, 832591.320)
#### $latitude
#### [1] 22.3237017196981
#### 
#### $longitude
#### [1] 114.138734989417

####  Answer from the online conversion tool
### 22.323701767
### 114.138734989

Convert HK80 geographical coordinates to HK80 UTM coordinates

Description

Convert HK80 geographical coordinates to HK80 UTM coordinates

Usage

HK80GEO_TO_HK80UTM(latitude, longitude)

Arguments

latitude

Numeric, latitude in decimal format.

longitude

Numeric, longitude in decimal format.

Details

Using equation (1) to (3) in the explanatory Note within this package. The document is available at : http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

Value

A list including the HK80UTM Coordinates, including: N, E, and Zone.

Note

The latitude and longitude input should be constrained to Hong Kong.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK80UTM_TO_HK80GEO

Examples

options(digits = 15)
#### The example on the explanatory notes
HK80GEO_TO_HK80UTM(22 + 26/60 + 6.76/3600, 114 + 10/60 + 20.46/3600)
#### Output
##  $N
##  [1] 2483772.487
##  
##  $E
##  [1] 208931.9164
##  
##  $zone
##  [1] "50Q"

###### The results from the explanatory notes
#### 2483772, 208932

###### The similar conversion is not available 
###### from the online conversion tool.


Convert HK80GEO coordinates to WGS84GEO coordinates

Description

Convert HK80GEO coordinates to WGS84GEO coordinates

Usage

HK80GEO_TO_WGS84GEO(latitude, longitude)

Arguments

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Details

This function utilizes the simplified relationship between HK80GEO and WGS84GEO described on Page B6 to do the transformation.

Value

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

WGS84GEO_TO_HK80GEO

Examples

options(digits = 15)
HK80GEO_TO_WGS84GEO(22.323701767, 114.138734989)

### $latitude
### [1] 22.3221739892222
### 
### $longitude
### [1] 114.141179433444

### Answer from the online conversion tool
### 22.322172084
### 114.141187917

Convert the HK80GEO coordinates to WGS84UTM coordinates

Description

Convert the HK80GEO coordinates to WGS84UTM coordinates

Usage

HK80GEO_TO_WGS84UTM(latitude, longitude)

Arguments

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Details

This function convert the HK80GEO coordinates to HK80UTM, and convert the intermediate output into WGS84UTM. More details can be found on page C4.

Value

N

Northern coordinate in meters

E

Eastern coordinate in meters

zone

UTM zone, either 49 or 50

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

WGS84UTM_TO_HK80GEO

Examples

options(digits = 15)
HK80GEO_TO_WGS84UTM(22.323701767, 114.138734989 )
#### $N
#### [1] 2471278.72895382
#### 
#### $E
#### [1] 205493.220909862
#### 
#### $zone
#### [1] 50

################################################
#### Answer from the online conversion tool 
#### 50Q, 2471279, 205494

Convert HK80UTM coordinates to HK1980GRID coordinates

Description

Convert HK80UTM coordinates to HK1980GRID coordinates

Usage

HK80UTM_TO_HK1980GRID(N, E, zone)

Arguments

N

Numeric, Northern coordinate in meters

E

Numeric, Eastern coordinate in meters

zone

zone, UTM zone, either 49 or 50 for Hong Kong.

Details

This function converts the coordinates to HK80GEO first, and convert the intermediate results into HK1980GRID coordinates.

Value

N

Northern coordinate in meters

E

Eastern coordinate in meters

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK1980GRID_TO_HK80UTM

Examples


#### The similar conversion is not available at 
#### http://www.geodetic.gov.hk/smo/tform/tform.aspx
#### The accuracy is unknown
options(digits = 15)
HK80UTM_TO_HK1980GRID(N = 2471279, E = 205494, zone = 50)


Convert the HK80UTM coordinates to HK80GEO coordinates

Description

Convert the HK80UTM coordinates to HK80GEO coordinates

Usage

HK80UTM_TO_HK80GEO(N, E, zone = c(49, 50))

Arguments

N

Numeric, Northern coordinate in meters.

E

Numeric, Eastern coordinate in meters.

zone

zone, UTM zone, either 49 or 50 for Hong Kong.

Details

This function uses equation 3, 4, 5 in the explanatory notes to convert the HK80UTM coordinates into HK80GEO coordinates (latitude and longitude) in decimal degrees. Mode details could be found at: Page C9 and C10 on the explanatory notes.

Value

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK80GEO_TO_HK80UTM

Examples

options(digits = 15)
HK80UTM_TO_HK80GEO(2483775, 208930, zone = 50)

#### $latitude
#### [1] 22.435188997523
#### 
#### $longitude
#### [1] 114.172349350774

##### Answer from the explanatory note:
### 22 + 26/60 + 06.89/3600 = 22.43524722
### 114 + 10/60 + 20.39/3600 = 114.1723306

Convert HK80UTM coordinates to WGS84GEO coordinates

Description

Convert HK80UTM coordinates to WGS84GEO coordinates

Usage

HK80UTM_TO_WGS84GEO(N, E, zone)

Arguments

N

Numeric, Northern coordinate in meters

E

Numeric, Eastern coordinate in meters

zone

zone, UTM zone number, for Hong Kong, either 49 or 50

Details

This function converts the HK80UTM coordinates into WGS84UTM coordinates first, and convert the intermediate results into WGS84GEO coordinates (latitude and longitude)

Value

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

WGS84GEO_TO_HK80UTM

Examples

#### The similar conversion is not available 
#### at http://www.geodetic.gov.hk/smo/tform/tform.aspx
#### Therefore, its accuracy is unknown.
options(digits = 15)
HK80UTM_TO_WGS84GEO(N = 2471279, E = 205494, zone = 50)

Convert HK80UTM coordinates to WGS84UTM coordinates

Description

Convert HK80UTM coordinates to WGS84UTM coordinates

Usage

HK80UTM_TO_WGS84UTM(N, E, zone = c(49, 50))

Arguments

N

Numeric, Northern coordinate in meters.

E

Numeric, Eastern coordinate in meters.

zone

zone, UTM zone number, either 49 or 50.

Details

This function uses the simplified relationship described on page B6 to convert HK80UTM to WGS84UTM coordinates.

Value

N

Northern coordinate in meters

E

Eastern coordinate in meters

zone

UTM zone, either 49 or 50

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

WGS84UTM_TO_HK80UTM

Examples

#### This function was not tested since similar 
#### conversion service is not available at 
#### http://www.geodetic.gov.hk/smo/tform/tform.aspx
options(digits = 15)
HK80UTM_TO_WGS84UTM(N = 2471279, E = 205494, zone = 50)

Covert WGS84GEO geographical coordinates TO HK1980GRID coordinates

Description

Covert WGS84GEO geographical coordinates TO HK1980GRID coordinates

Usage

WGS84GEO_TO_HK1980GRID(latitude, longitude)

Arguments

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Details

This function convert the latitude and longitude to HK80GEO coordinates first, and converts the later to HK1980GRID coordinates.

Value

N

Northern coordinate in meters

E

Eastern coordinate in meters

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK1980GRID_TO_WGS84GEO

Examples


options(digits = 15)
HK1980GRID_TO_WGS84GEO(820351.389, 832591.320)
### $latitude
### [1] 22.3221739419203
### 
### $longitude
### [1] 114.141179433862

### Answer from the online conversion tool
### http://www.geodetic.gov.hk/smo/tform/tform.aspx
### 22.322172084
### 114.141187917


Convert WGS84GEO coordinates to HK80GEO coordinates

Description

Convert WGS84GEO coordinates to HK80GEO coordinates

Usage

WGS84GEO_TO_HK80GEO(latitude, longitude)

Arguments

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Details

This function uses the simplified relationship between WGS84GEO and HK80GEO. See Page C4 on the explanatory note.

Value

latitude

latitude in decimal degrees

longtitude

longitude in decimal degrees

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK80GEO_TO_WGS84GEO

Examples

options(digits = 15)
WGS84GEO_TO_HK80GEO(22.322172084,  	114.141187917)
#### $latitude
#### [1] 22.3236998617778
#### 
#### $longitude
#### [1] 114.138743472556

#### Answer from the online conversion tool
#### http://www.geodetic.gov.hk/smo/tform/tform.aspx
#### 22.323701767,  114.138734989


Convert WGS84GEO coordinates to HK80UTM coordinates

Description

Convert WGS84GEO coordinates to HK80UTM coordinates

Usage

WGS84GEO_TO_HK80UTM(latitude, longitude)

Arguments

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Details

This function first converts the WGS84GEO coordinates to WGS84UTM, and then converts the corresponding WGS84UTM coordinates to HK80UTM.

Value

N

Northern coordinate in meters

E

Eastern coordinate in meters

zone

zone, either 49 or 50

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK80UTM_TO_WGS84GEO

Examples

#### The similar conversion is not available at 
#### http://www.geodetic.gov.hk/smo/tform/tform.aspx
#### Therefore it the output has not been verified.
options(digits = 15)
WGS84GEO_TO_HK80UTM(22.322172084, 114.141187917)


Convert WGS84GEO coordinates to WGS84UTM coordinates

Description

Convert WGS84GEO coordinates to WGS84UTM coordinates

Usage

WGS84GEO_TO_WGS84UTM(latitude, longitude)

Arguments

latitude

Latitude in decimal degrees

longitude

longitude in decimal degrees

Details

This function uses equation 1, 2, 3 in the explanatory notes to compute the WGS84UTM coordinates.

Value

N

The northern coordinates in meters

E

The eastern coordinates in meters

zone

zone for UTM, either 49 or 50

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

WGS84UTM_TO_WGS84GEO

Examples


options(digits = 15)
WGS84GEO_TO_WGS84UTM(22 + 26/60 + 1.26/3600, 114 + 10/60 + 29.31/3600)

#### 22.433683333333334531
#### 114.17480833333333123

#### $N
#### [1] 2483566.19687669
#### 
#### $E
#### [1] 209189.467417282
#### 
#### $zone
#### [1] 50

### Answer from the explanatory notes
### 2483566m N
### 209194m 
 
### Answer from 
### http://www.geodetic.gov.hk/smo/tform/tform.aspx
### 2483568m N
### 209192m E


Convert WGS84UTM coordinates to HK1980GRID coordinates

Description

Convert WGS84UTM coordinates to HK1980GRID coordinates

Usage

WGS84UTM_TO_HK1980GRID(N, E, zone)

Arguments

N

Numerical, Northern coordinate in meters.

E

Numerical, Eastern coordinate in meters.

zone

Numerical, either 49 or 50.

Details

This function converts the coordinates to WGS84GO, and then to HK80GO and eventually to HK1980GRID.

Value

N

Numerical, Northern coordinate in meters.

E

Numerical, Eastern coordinate in meters.

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK1980GRID_TO_WGS84UTM

Examples

options(digits = 15)
WGS84UTM_TO_HK1980GRID(2471279, 205494, zone = 50)
#### $N
#### [1] 820347.647263194
#### 
#### $E
#### [1] 832591.689923123

######################
#### Results from http://www.geodetic.gov.hk/smo/tform/tform.aspx
#### 820351.389, 832591.320


Convert WGS84UTM coordinates to HK80GEO coordinates

Description

Convert WGS84UTM coordinates to HK80GEO coordinates

Usage

WGS84UTM_TO_HK80GEO(N, E, zone)

Arguments

N

Numeric, The northern coordinate

E

Numeric, The eastern coordinate

zone

zone, numeric, either 49 or 50

Details

This function converts the coordinates first to WGS84GEO and then to HK80GEO.

Value

latitude

latitude in decimal degrees

longitude

longitude in decimal degrees

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK80GEO_TO_WGS84UTM

Examples


options(digits = 15)
WGS84UTM_TO_HK80GEO(2471279, 205494, zone = 50)

#### $latitude
#### [1] 22.323667977877
#### 
#### $longitude
#### [1] 114.138738570444

#### Results from http://www.geodetic.gov.hk/smo/tform/tform.aspx
#### 22.323701767
#### 114.138734989


Convert WGS84UTM coordinates TO HK80UTM coordinates

Description

Convert WGS84UTM coordinates TO HK80UTM coordinates

Usage

WGS84UTM_TO_HK80UTM(N, E, zone = c(49, 50))

Arguments

N

Numeric, Northern coordinate in meter

E

Numeric, Eastern coordinate in meter

zone

zone, numeric, either 49 or 50

Details

This functions uses a simplified relationship to convert the coordinates. If zone is 49, res.N = N + 195, res.E = E - 245; if zone is 50, res.N = N + 205, res.E = E - 260

Value

N

Northern coordinates in meters

E

Eastern coordinates in meters

zone

either 49 or 50

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

HK80UTM_TO_WGS84UTM

Examples

#### The similar conversion is not available at 
#### http://www.geodetic.gov.hk/smo/tform/tform.aspx
options(digits = 15)
WGS84UTM_TO_HK80UTM(2471279, 205494, zone = 50)


Covert WGS84UTM coordinates to WGS84GEO coordinates

Description

Covert WGS84UTM coordinates to WGS84GEO coordinates

Usage

WGS84UTM_TO_WGS84GEO(N, E, zone = c(49, 50))

Arguments

N

Numerical, the northern coordinates, in meters.

E

Numerical, the eastern coordinates, in meters.

zone

UTM zone, should be either 49 or 50.

Details

Using Equation 3,4,5 and iterations to compute the values.

Value

latitude

latitude based on WGS84 datum. In decimal degrees

longitude

longitude based on WGS84 datum. In decimal degrees

Note

The coordinates should be within the range of Hong Kong. Providing coordinates outside Hong Kong will lead to wrong results.

Author(s)

Jinlong Zhang

References

Survey & Mapping Office Lands Department, Hong Kong Government (1995). Explanatory Notes on Geodetic Datums in Hong Kong, available at: http://www.geodetic.gov.hk/smo/gsi/data/pdf/explanatorynotes.pdf

See Also

WGS84GEO_TO_WGS84UTM

Examples


options(digits = 15)
WGS84UTM_TO_WGS84GEO(2483568, 209192, zone = 50)

### $latitude
### [1] 22.4336553287886
### 
### $longitude
### [1] 114.174807232072
### 

### The answer from the explanatory notes is 
### 22 + 26/60 + 1.16/3600 = 22.433655555555557015
### 114 + 10/60 + 29.24/3600 = 114.17478888888889799