Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

stevegoddard
Copy link
Contributor

@stevegoddard stevegoddard commented Apr 16, 2019

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.

@dvdoug
Copy link
Owner

dvdoug commented Jul 21, 2019

@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 OSRef::fromTetrad method? What do you think?

@stevegoddard
Copy link
Contributor Author

stevegoddard commented Jul 24, 2019

@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 OSRef::fromTetrad method? What do you think?

@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.

@dvdoug
Copy link
Owner

dvdoug commented Aug 18, 2019

Since a Tetrad uses a different grid direction, this is something people would need to know anyway though? Or am I misunderstanding?

@stevegoddard
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants