Hello, I would like to ask a question regarding calculation of UTM letter in vikviewport.c/vik_viewport_screen_to_coord() function.
The following code is recognizing a possibility that input screen position passed as function's argument may be located in neighbouring UTM zone, therefore a zone_delta is calculated and the zone itself is adjusted (together in easting in that zone). However the code doesn't seem to consider a case where the input screen position may be located in another latitude band. The band letter in resulting utm variable is always set to be the same as band letter of viewport's center coordinate. I think that the letter of resulting utm should be calculated in some way. utm->zone = vvp->center.utm_zone; utm->letter = vvp->center.utm_letter; utm->easting = ( ( x - ( vvp->width_2) ) * vvp->xmpp ) + vvp->center.east_west; zone_delta = floor( (utm->easting - EASTING_OFFSET ) / vvp->utm_zone_width + 0.5 ); utm->zone += zone_delta; utm->easting -= zone_delta * vvp->utm_zone_width; utm->northing = ( ( ( vvp->height_2) - y ) * vvp->ympp ) + vvp->center.north_south; Please let me know your opinion. Best regards, Kamil
_______________________________________________ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/