Skip to content

Postgres extension for working with British and Irish national grid strings.

Notifications You must be signed in to change notification settings

BIS-Brecon/postgrids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgrids

An (very work in progress) attempt at building a postgres extension for working with British and Irish national grids (OSGB, and OSI). Provides a simple interface for converting valid grid references into eastings / northings and vice versa, as well as functionality to recalculate a grid reference to a new precision.

Built using the amazing pgrx, and wraps functionality from gridish.

Currently, does not support converting gridrefs into Geospatial primitives, as pgrx does not support postgis.

Examples

select osgb_from_string('SO892437');
---
SO892437

select osgb_from_eastings_northings(389200, 243700, 100);
---
SO892437

select osgb_precision('SO892437');
---
100

select osgb_recalculate('SO892437', 1000);
---
SO8943

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Postgres extension for working with British and Irish national grid strings.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages