Stone duality: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Honestrosewater
 
en>Crasshopper
mNo edit summary
Line 1: Line 1:
Escort services in your community specialize in visiting escorts and plenty of escort agencies is found there.  Before hiring escort agency a health check carried out to ensure their staff is much okay and fit for your services being offered.  Our expertise signifies that you'll be make sure that you may notice the foremost relax-able Escort service Mumbai at all degree times.  Most importantly, find out and write down the answers.  They do their best, deliver and receive high feedback from clients. <br><br>
{{Howto|date=May 2010}}
'''Geographic coordinates''' consist of [[latitude]] and [[longitude]].


The other gains of Thailand will be the outstanding golfing courses and the actuality that one could have healthcare and dental procedures finished in hospitals there for about 90% less than in the StateCurrent mans features a very clear opinion regarding the escorts services todayI was shocked and immediately closed my account' 'Jane, 24Generally speaking, the greater classified and exclusive the vacancy, greater the headhunter will likely be paid, though the tab is definitely paid with the hiring companyThere are numerous escort companies right now, and most of these companies get good treatment from the safety and privacy difficulties with their customers, which tends to make [https://plus.google.com/u/0/b/100163234363792992106/100163234363792992106/about https://plus.google.com/u/0/b/100163234363792992106/100163234363792992106/about] these companies the most trusted sources for selecting Chicago High end escorts.  <br><br>Cobra XRS 9970G Radar Detector - This is the best radar detector about the market for those that need a radar detector but do donrrrt you have a - Cobra XRS 9970G Voice Alert 15 Band Radar and Laser Detector lots of cash to throw aroundYou can engage in their discreet and trustworthy service anytime and anywhere" Admitting to her secret life might be just a symptom of her problems as online photos of her call girl days are actually posted on "The Smoking GunDoing a look for “escort Las Palmas” or “escorts Las Palmas” or “Las Palmas escort” hwoever doesn’t raise up anywhere near as many hits as if you type keywords including “escort Gran Canaria” or escorts Gran Canaria into a search engineWith the info provided and products below no person will ever need to know that you simply always leave 5 minutes late and arrive 5 minutes early<br><br>Them all notice that any guy may be unfaithful whenever they're doing they could ruin a relationship destroy children and convey a terrible finish for many once wonderful relationship.  The thought of visiting Ontario is basically exciting but computerized devices more exhilarating will be the thought of having an attractive woman beside you sharing every bit with the thrill and excitement an Ontario visit gives. This is the place that the available Greenford escorts for that day are posted. The readily available online London escort services can lead you for the most beautiful and gorgeous escorts. On the off chance that you lean toward dating your fantasy young lady some place like within your lodging room or at your home, name them to have an outcall administration.  <br><br>All you need is usually to engage the most effective service among the hundreds available. If it takes, it's possible to ask the company to give you the phone numbers for their previous clients and can talk with themDo not be shocked should they ask for that you put the cash inside a safe and simple to access location that could possibly be picked up when they opt to leave or if the evening is over and in addition do 't be confused if they don't want to accept payment as quickly because they arrive. So be constructive to analyze our increasing profiles of remarkable Uncommon Dates dating escorts regularly. Various keywords of escorts grouped based on their later than, construction, size and breed - ebony, brown, blonde, full-sized, slim, young, busty and exotic, a number the categories, the most typical associates today.
==Ways of writing coordinates==
 
All of the following are valid and acceptable ways to write geographic coordinates:
* 40:26:46.302N 079:58:55.903W
* 40°26′46″N 079°58′56″W
* 40d 26′ 46″ N 079d 58′ 56″ W
* 40.446195N 79.982195W
* 40.446195, -79.982195
* 40.446195,-79.982195
* 40° 26.7717, -79° 58.93172
* N40:26:46.302 W079:58:55.903
* N40°26′46″ W079°58′56″
* N40d 26′ 46″ W079d 58′ 56″
* N40.446195 W79.982195
Coordinates in this encyclopedia are generally written as {{Coord|40|26|21|N|079|58|56|W|}}.
 
==Basic forms==
 
There are three basic forms of a coordinate.
 
# Coordinate containing degrees (integer), minutes (integer), and seconds (integer, or real number) (DMS).
# Coordinate containing degrees (integer) and minutes (real number) (MinDec).
# Coordinate containing only degrees (real number) (DegDec).
 
All forms of coordinates are capable of representing the same amount of data and the same precision.  Depending on which type of coordinate you are provided with, and which type you would like to work with, you may have to do some conversion.
 
==Components of a typical coordinate==
 
In its most simple form a coordinate is just a number of degrees.  The tricky part comes in when you need to differentiate North/South latitude or West/East longitude, or make the number more digestible by writing it with minutes and seconds instead of as a decimal number.
 
===Degrees===
 
The degrees portion of the coordinate is always going to be the easiest to figure outThe degrees is always the left-most whole numberFor example:
 
40:26:46N        40
W79°58′56"      -79
 
A sphere is divided into 360 degreesThe number space is divided into two halves, East and West in the case of longitude and North and South in the case of latitude.  The maximum ranges are as follows:
 
Longitude
  180 W  = -180
  180 E  =  180
 
Latitude
  90 N  =  90
  90 S  =  -90
 
Technically you could have latitudes greater than 90 or less than -90, but this is an ambiguous case, since there would be an equivalent coordinate with an inverse longitude.
 
The minimal case is that you have only degrees:
 
  40.446195 or
  40.446195N
 
===Minutes===
 
Minutes are an optional component, as is implied by the minimal case of degreesIf there is no minutes component, the degrees component contains the entire precision of the coordinate and there must not be a seconds component.  Minutes are actually the numerator component of a fraction with denominator 60 of one degree.
 
With the same examples as above:
 
  40:26:46N        26
W079°58′56"      58
 
===Seconds===
 
Seconds are also an optional component, and can only exist if the minutes component also exists. Seconds are the numerator component of a fraction with denominator 60 of one minute.
 
40:26:46N        46
W079°58′56        56
 
To convert, 56 seconds is equal to <math>\frac{56}{60} = 0.9\bar{3}</math> minutes.
 
==Putting it all together==
 
===Conversion from DMS to Decimal Degree===
 
Given a DMS (Degrees, Minutes, Seconds) coordinate such as W079°58′56″, convert it to a number of decimal degrees using the following method:
 
# Calculate the total number of seconds:<br />58′56″ = (58*60 + 56) = 3536 seconds.
# The fractional part is the total number of seconds divided by 3600:<br />3536 / 3600 = ~0.982222
# Add fractional degrees to whole degrees to produce the final result:<br />79 + 0.982222 = 79.982222
# Since it is a West longitude coordinate, negate the result.
# The final result is '''-79.982222'''.
 
===Conversion from MinDec to Decimal Degree===
 
Given a MinDec (Degrees, Minutes, Decimal Minutes) coordinate such as 79°58.93172W, convert it to a number of decimal degrees using the following method:
 
# The integer number of degrees is the same (79)
# The decimal degrees is the decimal minutes divided by 60 (58.93172/60 = ~0.982195)
# Add the two together (79 + 0.982195= 79.982195)
# For coordinates ind the western (or southern) hemisphere, negate the result.
# The final result is '''-79.982195'''
 
===Conversion from Decimal Degree to DMS===
 
Given a decimal longitudinal coordinate such as -79.982195 it will be necessary to know whether it is a latitudinal or longitudinal coordinate in order to fully convert itThe method is as follows:
 
* Subtract the whole number portion of the coordinate, leaving the fractional partThe whole number is the number of degrees. In the example of -79.982195: -79 degrees.
* Multiply the remaining fractional part by 60This will produce a number of minutes in the whole number portion. In the example: 0.982195 x 60 = 58.9317 => 58 minutes.
* Multiply the fractional part of the number of minutes by 60, producing a number of seconds.  0.9317 x 60 = 55.903 => 55.903 secondsIt is possible to keep the entire number, truncate to the decimal 55 or round to the decimal 56.
* Depending on whether the source number was a latitudinal or longitudinal coordinate, and the sign of the number, add the N/S/E/W specifierThe following table shows the possibilities:
 
  Type  Dir.  Sign    Test
  Lat.  N      +      > 0
  Lat.  S      -      < 0
  Long.  E      +      > 0
  LongW      -      < 0
 
A latitude of 0°0′0″ (at [[The Equator]]) is neither North nor South. Similarly, a longitude of 0°0′0″ (at the [[Prime Meridian]]) is neither East nor West. These are referred to as zero latitude and zero longitude, respectively. A longitude of 180°0′0″ (the [[180th meridian]]) is neither East nor West. This is the basis for the [[International Date Line]] when referring to the Earth.
 
* The final result for the above example is: W 79°58′56″.
 
====Programmatical conversion====
 
The most common programmatical use of these processes is to display a coordinate to an end user in the more common DMS form instead of decimal form. Below is a piece of [[pseudocode]] to convert from decimal degrees to degrees, minutes, and seconds:
 
  '''function''' deg_to_dms ( degfloat )
    ''Input must be non-negative:''
    '''if''' degfloat < 0
      error
    '''end if'''
    ''Compute degrees, minutes and seconds:''
    deg ← integerpart ( degfloat )
    minfloat ← 60 * ( degfloat - deg )
    min ← integerpart ( minfloat )
    secfloat ← 60 * ( minfloat - min )
    ''Round seconds to desired accuracy:''
    secfloat ← round( secfloat, digits )
    ''After rounding, the seconds might become 60. These two''
    ''if-tests are not necessary if no rounding is done.''
    '''if''' secfloat = 60
      min ← min + 1
      secfloat ← 0
    '''end if'''
    '''if''' min = 60
      deg ← deg + 1
      min ← 0
    '''end if'''
    ''Return output:''
    return ( deg, min, secfloat )
  '''end function'''
 
====Java Implementation====
 
<syntaxhighlight lang="java">
 
// Input a double latitude or longitude in the decimal format
// e.g. -79.982195
String decimalToDMS(double coord) {
String output, degrees, minutes, seconds;
 
// gets the modulus the coordinate divided by one (MOD1).
// in other words gets all the numbers after the decimal point.
// e.g. mod := -79.982195 % 1 == 0.982195
//
// next get the integer part of the coord. On other words the whole number part.
// e.g. intPart := -79
double mod = coord % 1;
int intPart = (int)coord;
 
//set degrees to the value of intPart
//e.g. degrees := "-79"
 
degrees = String.valueOf(intPart);
 
// next times the MOD1 of degrees by 60 so we can find the integer part for minutes.
// get the MOD1 of the new coord to find the numbers after the decimal point.
// e.g. coord := 0.982195 * 60 == 58.9317
// mod  := 58.9317 % 1    == 0.9317
//
// next get the value of the integer part of the coord.
// e.g. intPart := 58
coord = mod * 60;
mod = coord % 1;
intPart = (int)coord;
        if (intPart < 0) {
          // Convert number to positive if it's negative.
          intPart *= -1;
        }
 
// set minutes to the value of intPart.
// e.g. minutes = "58"
minutes = String.valueOf(intPart);
 
//do the same again for minutes
//e.g. coord := 0.9317 * 60 == 55.902
//e.g. intPart := 55
coord = mod * 60;
intPart = (int)coord;
        if (intPart < 0) {
          // Convert number to positive if it's negative.
          intPart *= -1;
        }
 
// set seconds to the value of intPart.
// e.g. seconds = "55"
seconds = String.valueOf(intPart);
 
// I used this format for android but you can change it
// to return in whatever format you like
// e.g. output = "-79/1,58/1,56/1"
output = degrees + "/1," + minutes + "/1," + seconds + "/1";
 
//Standard output of D°M′S″
//output = degrees + "°" + minutes + "'" + seconds + "\"";
 
return output;
}
 
      /*
* Conversion DMS to decimal
*
* Input: latitude or longitude in the DMS format ( example: W 79° 58' 55.903")
* Return: latitude or longitude in decimal format 
* hemisphereOUmeridien => {W,E,S,N}
*
*/
public double DMSToDecimal(String hemisphereOUmeridien,double degres,double minutes,double secondes)
{
double LatOrLon=0;
double signe=1.0;
if((hemisphereOUmeridien.equals("W"))||(hemisphereOUmeridien.equals("S"))) {signe=-1.0;}
LatOrLon = signe*(Math.floor(degres) + Math.floor(minutes)/60.0 + secondes/3600.0);
return(LatOrLon);
}
 
</syntaxhighlight>
 
==See also==
* [[Wikipedia : Obtaining geographic coordinates]]
* [[Mimee]] : An online coordinate converter
* [[PROJ.4]] : A library for performing conversions between cartographic projections
 
==External links==
*[http://www.get-direction.com/batch-lat-long-converter-from-ddd-to-dmm-and-dms.html Batch Lat/Long Converter (from DDD to DMM and DMS) using the algorithm explained here]
*[http://geographiclib.sourceforge.net/cgi-bin/GeoConvert Easy-to-use online converter with UTM support]
*[http://earth-info.nga.mil/GandG/geotrans/index.html GeoTrans 2.4.2] A geographic translator application for Linux/Unix/Windows that supports 25 coordinate systems and 200 datums
*[http://www.mapwel.net/coorconversion.htm Online converter with tutorial and notes about most frequent user errors]
*[http://www.earthpoint.us/Convert.aspx Online converter which can understand many different notations]
*[http://ws.plexscape.com/Services/CoordSysWS/Pages/Transformations.aspx Plexscape WS] Advanced free online tool for coordinate conversion, fully interactive with Google Maps - Supports more than 3,000 coordinate systems and 400 datums worldwide
*[http://xahlee.info/comp/programing_decimalize_latitude_longitude.html Programing: Decimalize Latitude Longitude] in Python, Ruby
 
[[Category:Geographic coordinate systems|*Conversion]]

Revision as of 23:34, 27 December 2013

Template:Howto Geographic coordinates consist of latitude and longitude.

Ways of writing coordinates

All of the following are valid and acceptable ways to write geographic coordinates:

  • 40:26:46.302N 079:58:55.903W
  • 40°26′46″N 079°58′56″W
  • 40d 26′ 46″ N 079d 58′ 56″ W
  • 40.446195N 79.982195W
  • 40.446195, -79.982195
  • 40.446195,-79.982195
  • 40° 26.7717, -79° 58.93172
  • N40:26:46.302 W079:58:55.903
  • N40°26′46″ W079°58′56″
  • N40d 26′ 46″ W079d 58′ 56″
  • N40.446195 W79.982195

Coordinates in this encyclopedia are generally written as Template:Coord.

Basic forms

There are three basic forms of a coordinate.

  1. Coordinate containing degrees (integer), minutes (integer), and seconds (integer, or real number) (DMS).
  2. Coordinate containing degrees (integer) and minutes (real number) (MinDec).
  3. Coordinate containing only degrees (real number) (DegDec).

All forms of coordinates are capable of representing the same amount of data and the same precision. Depending on which type of coordinate you are provided with, and which type you would like to work with, you may have to do some conversion.

Components of a typical coordinate

In its most simple form a coordinate is just a number of degrees. The tricky part comes in when you need to differentiate North/South latitude or West/East longitude, or make the number more digestible by writing it with minutes and seconds instead of as a decimal number.

Degrees

The degrees portion of the coordinate is always going to be the easiest to figure out. The degrees is always the left-most whole number. For example:

40:26:46N         40
W79°58′56"       -79

A sphere is divided into 360 degrees. The number space is divided into two halves, East and West in the case of longitude and North and South in the case of latitude. The maximum ranges are as follows:

Longitude
 180 W   = -180
 180 E   =  180
Latitude
  90 N   =   90
  90 S   =  -90

Technically you could have latitudes greater than 90 or less than -90, but this is an ambiguous case, since there would be an equivalent coordinate with an inverse longitude.

The minimal case is that you have only degrees:

 40.446195 or
 40.446195N

Minutes

Minutes are an optional component, as is implied by the minimal case of degrees. If there is no minutes component, the degrees component contains the entire precision of the coordinate and there must not be a seconds component. Minutes are actually the numerator component of a fraction with denominator 60 of one degree.

With the same examples as above:

40:26:46N         26
W079°58′56"       58

Seconds

Seconds are also an optional component, and can only exist if the minutes component also exists. Seconds are the numerator component of a fraction with denominator 60 of one minute.

40:26:46N         46
W079°58′56        56

To convert, 56 seconds is equal to minutes.

Putting it all together

Conversion from DMS to Decimal Degree

Given a DMS (Degrees, Minutes, Seconds) coordinate such as W079°58′56″, convert it to a number of decimal degrees using the following method:

  1. Calculate the total number of seconds:
    58′56″ = (58*60 + 56) = 3536 seconds.
  2. The fractional part is the total number of seconds divided by 3600:
    3536 / 3600 = ~0.982222
  3. Add fractional degrees to whole degrees to produce the final result:
    79 + 0.982222 = 79.982222
  4. Since it is a West longitude coordinate, negate the result.
  5. The final result is -79.982222.

Conversion from MinDec to Decimal Degree

Given a MinDec (Degrees, Minutes, Decimal Minutes) coordinate such as 79°58.93172W, convert it to a number of decimal degrees using the following method:

  1. The integer number of degrees is the same (79)
  2. The decimal degrees is the decimal minutes divided by 60 (58.93172/60 = ~0.982195)
  3. Add the two together (79 + 0.982195= 79.982195)
  4. For coordinates ind the western (or southern) hemisphere, negate the result.
  5. The final result is -79.982195

Conversion from Decimal Degree to DMS

Given a decimal longitudinal coordinate such as -79.982195 it will be necessary to know whether it is a latitudinal or longitudinal coordinate in order to fully convert it. The method is as follows:

  • Subtract the whole number portion of the coordinate, leaving the fractional part. The whole number is the number of degrees. In the example of -79.982195: -79 degrees.
  • Multiply the remaining fractional part by 60. This will produce a number of minutes in the whole number portion. In the example: 0.982195 x 60 = 58.9317 => 58 minutes.
  • Multiply the fractional part of the number of minutes by 60, producing a number of seconds. 0.9317 x 60 = 55.903 => 55.903 seconds. It is possible to keep the entire number, truncate to the decimal 55 or round to the decimal 56.
  • Depending on whether the source number was a latitudinal or longitudinal coordinate, and the sign of the number, add the N/S/E/W specifier. The following table shows the possibilities:
  Type   Dir.   Sign    Test
  Lat.   N      +       > 0
  Lat.   S      -       < 0
  Long.  E      +       > 0
  Long.  W      -       < 0

A latitude of 0°0′0″ (at The Equator) is neither North nor South. Similarly, a longitude of 0°0′0″ (at the Prime Meridian) is neither East nor West. These are referred to as zero latitude and zero longitude, respectively. A longitude of 180°0′0″ (the 180th meridian) is neither East nor West. This is the basis for the International Date Line when referring to the Earth.

  • The final result for the above example is: W 79°58′56″.

Programmatical conversion

The most common programmatical use of these processes is to display a coordinate to an end user in the more common DMS form instead of decimal form. Below is a piece of pseudocode to convert from decimal degrees to degrees, minutes, and seconds:

function deg_to_dms ( degfloat )
   Input must be non-negative:
   if degfloat < 0
      error
   end if
   Compute degrees, minutes and seconds:
   deg ← integerpart ( degfloat )
   minfloat ← 60 * ( degfloat - deg )
   min ← integerpart ( minfloat )
   secfloat ← 60 * ( minfloat - min )
   Round seconds to desired accuracy:
   secfloat ← round( secfloat, digits )
   After rounding, the seconds might become 60. These two
   if-tests are not necessary if no rounding is done.
   if secfloat = 60
      min ← min + 1
      secfloat ← 0
   end if
   if min = 60
      deg ← deg + 1
      min ← 0
   end if
   Return output:
   return ( deg, min, secfloat )
end function

Java Implementation

// Input a double latitude or longitude in the decimal format
// e.g. -79.982195
String decimalToDMS(double coord) {
	String output, degrees, minutes, seconds;

	// gets the modulus the coordinate divided by one (MOD1).
	// in other words gets all the numbers after the decimal point.
	// e.g. mod := -79.982195 % 1 == 0.982195 
	//
	// next get the integer part of the coord. On other words the whole number part.
	// e.g. intPart := -79
	
	double mod = coord % 1;
	int intPart = (int)coord;

	//set degrees to the value of intPart
	//e.g. degrees := "-79"

	degrees = String.valueOf(intPart);

	// next times the MOD1 of degrees by 60 so we can find the integer part for minutes.
	// get the MOD1 of the new coord to find the numbers after the decimal point.
	// e.g. coord :=  0.982195 * 60 == 58.9317
	//	mod   := 58.9317 % 1    == 0.9317
	//
	// next get the value of the integer part of the coord.
	// e.g. intPart := 58
	
	coord = mod * 60;
	mod = coord % 1;
	intPart = (int)coord;
        if (intPart < 0) {
           // Convert number to positive if it's negative.
           intPart *= -1;
        }

	// set minutes to the value of intPart.
	// e.g. minutes = "58"
	minutes = String.valueOf(intPart);

	//do the same again for minutes
	//e.g. coord := 0.9317 * 60 == 55.902
	//e.g. intPart := 55
	coord = mod * 60;
	intPart = (int)coord;
        if (intPart < 0) {
           // Convert number to positive if it's negative.
           intPart *= -1;
        }

	// set seconds to the value of intPart.
	// e.g. seconds = "55"
	seconds = String.valueOf(intPart);

	// I used this format for android but you can change it 
	// to return in whatever format you like
	// e.g. output = "-79/1,58/1,56/1"
	output = degrees + "/1," + minutes + "/1," + seconds + "/1";

	//Standard output of D°M′S″
	//output = degrees + "°" + minutes + "'" + seconds + "\"";

	return output;
}

       /*
	* Conversion DMS to decimal 
	*
	* Input: latitude or longitude in the DMS format ( example: W 79° 58' 55.903")
	* Return: latitude or longitude in decimal format   
	* hemisphereOUmeridien => {W,E,S,N}
	*
	*/
	public double DMSToDecimal(String hemisphereOUmeridien,double degres,double minutes,double secondes)
	{
		double LatOrLon=0;
		double signe=1.0;
				
		if((hemisphereOUmeridien.equals("W"))||(hemisphereOUmeridien.equals("S"))) {signe=-1.0;}		
		LatOrLon = signe*(Math.floor(degres) + Math.floor(minutes)/60.0 + secondes/3600.0);
		
		return(LatOrLon);		
	}

See also

External links