Example #1
0
 static TMProjection Get_NZTM_Projection()
 {
     if (!initiallized)
     {
         projection = new TMProjection();
         TMProj(ref projection, NZTM_A, NZTM_RF, AngleConvertion.Deg2Rad(NZTM_CM), NZTM_SF, AngleConvertion.Deg2Rad(NZTM_OLAT), NZTM_FE, NZTM_FN, 1.0);
         initiallized = true;
     }
     return(projection);
 }
 private void addressTxtBox_Leave(object sender, EventArgs e)
 {
     try
     {
         Tuple <double, double> latlong = Geocoding.GeocodeAddress(addressTxtBox.Text);
         double northingNztm            = new double();
         double eastingNztm             = new double();
         NZGD2000_NZTM.geod_nztm(AngleConvertion.Deg2Rad(latlong.Item1), AngleConvertion.Deg2Rad(latlong.Item2), ref northingNztm, ref eastingNztm);
         coordEastingTxtBox.Text  = northingNztm.ToString();
         coordNorthingTxtBox.Text = eastingNztm.ToString();
         latlongNztm = new Tuple <double, double>(eastingNztm, northingNztm);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error : Can't get coordinates of the address.");
     }
 }