Documentation
¶
Index ¶
Constants ¶
View Source
const ( Region_OUTSIDE_BOUNDARY geoidRegion = 0 // 02 Region_UK_MAINLAND geoidRegion = 1 // 02,15 Region_SCILLY_ISLES geoidRegion = 2 // 02,15 Region_ISLE_OF_MAN geoidRegion = 3 // 02,15 Region_OUTER_HEBRIDES geoidRegion = 4 // 02,15 Region_ST_KILDA geoidRegion = 5 // 02 Region_SHETLAND_ISLES geoidRegion = 6 // 02,15 Region_ORKNEY_ISLES geoidRegion = 7 // 02,15 Region_FAIR_ISLE geoidRegion = 8 // 02 Region_FLANNAN_ISLES geoidRegion = 9 // 02 Region_NORTH_RONA geoidRegion = 10 // 02 Region_SULE_SKERRY geoidRegion = 11 // 02 Region_FOULA geoidRegion = 12 // 02 Region_REPUBLIC_OF_IRELAND geoidRegion = 13 // 02 Region_NORTHERN_IRELAND geoidRegion = 14 // 02 Region_OFFSHORE geoidRegion = 15 // 15 Region_OUTSIDE_TRANSFORMATION geoidRegion = 16 // 15 )
Variables ¶
View Source
var ( // ErrPointOutsidePolygon indicates the position is too far offshore to be transformed. ErrPointOutsidePolygon = errors.New("point outside polygon") // ErrPointOutsideTransformation indicates the position is completely outside the grid transformation extent ErrPointOutsideTransformation = errors.New("point outside transformation limits") )
Functions ¶
This section is empty.
Types ¶
type CoordinateTransformer ¶
type CoordinateTransformer interface { // ToNationalGrid coverts a coordinate position from ETRS89 to OSGB36/ODN ToNationalGrid(c *ETRS89Coordinate) (*OSGB36Coordinate, error) // FromNationalGrid coverts a coordinate position from OSGB36/ODN to ETRS89 FromNationalGrid(c *OSGB36Coordinate) (*ETRS89Coordinate, error) }
CoordinateTransformer is used to convert between OSGB36/ODN and ETRS89 geodetic datums
func NewOSTN02Transformer ¶
func NewOSTN02Transformer() (CoordinateTransformer, error)
NewOSTN02Transformer returns a transformer that uses OSTN02/OSGM02
func NewOSTN15Transformer ¶
func NewOSTN15Transformer() (CoordinateTransformer, error)
NewOSTN15Transformer returns a transformer that uses OSTN15/OSGM15
type ETRS89Coordinate ¶
type ETRS89Coordinate struct { // Longitude in decimal degrees Lon float64 // Latitude in decimal degrees Lat float64 // Height in metres Height float64 }
ETRS89Coordinate represents a coordinate position in the ETRS89 geodetic datum. Whilst not being identical this can be treated as a GPS coordinate.
func NewETRS89Coord ¶
func NewETRS89Coord(lon, lat, height float64) *ETRS89Coordinate
NewETRS89Coord creates a new coordinate position in the ETRS89 geodetic datum.
type OSGB36Coordinate ¶
type OSGB36Coordinate struct { // Easting in metres Easting float64 // Northing in metres Northing float64 // Height in metres Height float64 }
OSGB36Coordinate represents a coordinate position in the OSGB36/ODN geodetic datum.
func NewOSGB36Coord ¶
func NewOSGB36Coord(easting, northing, height float64) *OSGB36Coordinate
NewOSGB36Coord creates a new coordinate position in the OSGB36/ODN geodetic datum.
Click to show internal directories.
Click to hide internal directories.