public void computeZone(DrawContext dc) { try { Position centerPos = ((OrbitView) dc.getView()).getCenterPosition(); if (centerPos != null) { if (centerPos.latitude.degrees <= UTM_MAX_LATITUDE && centerPos.latitude.degrees >= UTM_MIN_LATITUDE) { UTMCoord UTM = UTMCoord.fromLatLon( centerPos.getLatitude(), centerPos.getLongitude(), dc.getGlobe()); this.zone = UTM.getZone(); } else this.zone = 0; } } catch (Exception ex) { this.zone = 0; } }