-
Notifications
You must be signed in to change notification settings - Fork 11
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
How to get the gridZone letter? #3
Comments
Calculate? No. Or I should say that it's possible to calculate most of the zones but since some of them are distorted for strategic reasons you'll need to have a few that are looked up. You will definitely want to unit test for that
… On 2 May 2017, at 18:37, Nic Hubbard ***@***.***> wrote:
Is there a way to calculate what the grideZone letter would be? E.g. 32U or 10T. How can we get the U or T?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I guess my question should have been. How are other UTM converters doing it? |
I'm not sure.
… On 2 May 2017, at 19:14, Nic Hubbard ***@***.***> wrote:
I guess my question should have been. How are other UTM converters doing it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I wrote this up and seems to be what I am needing:
|
So you won't special case Norway and Svalbard
… On 2 May 2017, at 23:04, Nic Hubbard ***@***.***> wrote:
I wrote this up and seems to be what I am needing:
+ (NSString *)UTMlatZoneForCoordinates:(CLLocationCoordinate2D)coordinate {
NSString *DigraphLetrsE = @"ABCDEFGHJKLMNPQRSTUVWXYZ";
int latz = 0;//Latitude zone: A-B S of -80, C-W -80 to +72, X 72-84, Y,Z N of 84
double latd = coordinate.latitude;
if (latd > -80 && latd < 72) {
latz = floor((latd + 80)/8)+2;
}
if (latd > 72 && latd < 84) {
latz = 21;
}
if (latd > 84){
latz = 23;
}
char letter = [DigraphLetrsE characterAtIndex:latz];
return [NSString stringWithFormat:@"%c", letter];
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Norway is |
Put in the lat/long for Bergen
…Sent from my iPhone
On 3 May 2017, at 00:00, Nic Hubbard ***@***.***> wrote:
Norway is 32V and that seems to be working correctly. What should I be doing different?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Here's an illustration
http://www.geo.uib.no/eworkshop/uploads/Main/utm-zones-small.png
… On 3 May 2017, at 07:53, Cameron Lowell Palmer ***@***.***> wrote:
Put in the lat/long for Bergen
Sent from my iPhone
> On 3 May 2017, at 00:00, Nic Hubbard ***@***.***> wrote:
>
> Norway is 32V and that seems to be working correctly. What should I be doing different?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to calculate what the grideZone letter would be? E.g. 32U or 10T. How can we get the U or T?
The text was updated successfully, but these errors were encountered: