-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for tetrads to OSRef.php. #21
base: master
Are you sure you want to change the base?
Conversation
@stevegoddard I'm happy to have this functionality added to the library, but since Tetrads seem to be not be an official OS referencing system, I think it would be clearer if it were to have a dedicated |
@dvdoug I can see your point. This would mean that anyone using the package would need to check the length of the grid ref before calling the correct method. Having the package check the length itself seems neater and easier. Up to you. If you want me to move it to it's own method I'll happily do that. |
Since a Tetrad uses a different grid direction, this is something people would need to know anyway though? Or am I misunderstanding? |
We get data (wildlife sightings) in all different resolutions - often mixed together. So records for 1km grid squares (i.e. SO2242) and 2km (tetrad) squares (i.e. SO24G). Any grid ref 5 characters long (provided it's not an error) is a tetrad. So for us it's just simpler if the system checks the length and does the conversion. Just seems simpler - if it's 5 chars it must be a tetrad. |
9a2fc14
to
a51958d
Compare
c08befb
to
079e4d5
Compare
48e916b
to
a64be84
Compare
8fbe41c
to
696ad70
Compare
aec3885
to
6ef80c8
Compare
0d5f345
to
adda176
Compare
6c7430b
to
2b5b4ce
Compare
2b4191d
to
1ad806c
Compare
Updated OSRef.php to accept tetrads and convert them to eastings / northings.
Updated OSRef.php to allow export to tetrad (toGridReference method).
The tetrad grid letters go in a different orientation to the main OS grid (start bottom left and run vertically). They also contain the letter I and exclude the letter O.
A lot of wildlife data is recorded at tetrad resolution so hopefully this will be useful functionality.