Welcome to hsgconv’s documentation!

HSGconv provides conversion support from/to England’s highways standards local grids to OSGB36 EPSG:27700.

Website:

https://www.brydenwood.co.uk/

Source:

https://github.com/ccampanile/hsgconv

Bug reports:

https://github.com/ccampanile/hsgconv/issues

Simple example

Transform a point’s coordinates from local grid (A20) to national grid reference system:

>>> import hsgconv
>>> pt = (17573.0093, 398330.8085, 99.425508)
>>> gp = GridParams(gridID="A20", mean_z=96.98)
>>> to_nat = ConvertToOSBG(gp, pt[0], pt[1])
>>> print(to_nat)
(522569.0642059806, 227241.3842890684)

Bugs

Please report any bugs that you find here.

License

Released under the GNU GPL v3 license:

Copyright (C) 2017-2018 Bryden Wood Technology
Claudio Campanile <ccampanile@brydenwood.co.uk>
hsgconv.GridParams(gridID, mean_z)

Retrieve conversion params specific to a grid

Parameters:
Returns:

Conversion_parameters: tuple, (‘gridID, PSF, ESF, CSF, 1/CSF, Eo, No’)

hsgconv.CreateParamList(gridID, PSF, ESF, Eo, No)

Create a custom parameters list. Be careful of your inputs

Parameters:
Returns:

Custom parameters for coordinate conversion

hsgconv.ConvertToOSBG(myGridParam, x_coord, y_coord)

Convert local grid’s (x,y) to OBSG’s (easting, northing)

Parameters:
  • myGridParam – conversion parameter of local grid (‘gridID, PSF, ESF, CSF, 1/CSF, Eo, No’)
  • x_coord – x coordinate in local grid
  • y_coord – y coordinate in local grid
Returns:

OSBG36’s Easting and Northing

hsgconv.ConvertToLocalGrid(myGridParam, easting, northing)

Convert OSBG’s (easting, northing) to local grid’s (x,y)

Parameters:
  • myGridParam – conversion parameter of local grid as (‘gridID, PSF, ESF, CSF, 1/CSF, Eo, No’)
  • easting – easting in OSBG36
  • northing – northing in OSBG36
Returns:

HS local grid’s X and Y coordinates

Indices and tables