/** * set lat and lon by using UTM coordinates * * @param strZone UTM-zone, e.g. 32U * @param strNorthing Northing component * @param strEasting Easting component */ public void set(String strZone, String strNorthing, String strEasting) { LatLonPoint ll = new LatLonPoint(); utm.zone_letter = strZone.charAt(strZone.length() - 1); utm.zone_number = Convert.toInt(strZone.substring(0, strZone.length() - 1)); utm.northing = (float) Common.parseDouble(strNorthing); utm.easting = (float) Common.parseDouble(strEasting); ll = utm.toLatLonPoint(); // returns null if unvalit UTM-coordinates if (ll != null) { this.utmValid = true; this.latDec = ll.getLatitude(); this.lonDec = ll.getLongitude(); } else { this.latDec = 91; this.lonDec = 361; } }
/** * Create CWPoint by using a LatLonPoint * * @param CWPoint LatLonPoint */ public CWPoint(LatLonPoint llPoint) { super(llPoint.getLatitude(), llPoint.getLongitude()); this.utmValid = false; }
/** * Set CWPoint by using a LatLonPoint * * @param CWPoint LatLonPoint */ public void set(LatLonPoint llPoint) { this.latDec = llPoint.getLatitude(); this.lonDec = llPoint.getLongitude(); this.utmValid = false; }