Geoloc

Field: const double COMPARISON_TOLERANCE

If the latitude and longitude information are compared while this difference is significant, the difference is tolerated.

The value of comparison tolerance is 0.0000001


Constructor(Double, Double)

It represents the constructor method. It is constructed with latitude and longitude information of type double.

Parameter Name Description
latitude double type latitude information
longitude double type longtitude information

Method: static Geoloc Parse(String)

It verifies the latitude and longitude information of the String type and converts it to Geoloc type.

Parameter Name Description
geolocString Latitude and longitude information in a String type. It must be a decimal point in the longitude and latitude information. There must be a comma and space between the real and longitude information. Example: 38.9637, 35.2433

Error Type: FormatException (Format mismatch)


Property: double Latitude

Returns the latitude knowledge.


Property: double Longitude

Returns the longitude knowledge.


Method: double GetDistanceTo(Geoloc)

Calculates the distance from the given value and returns the result in double type.

Parameter Name Description
other Coordinate information to calculate distance

Method: Extend GetExtent(Double)

By accepting the current coordinates as the center, it calculates the minimum coverage to cover the given distance and returns to the north and southeast coordinates. The returned scope also contains farther points than the given distance.

Positive latitude / longitude (such as Turkey) working between 1m - 1000km healthy!

Parameter Name Description
distanceInMeters Distance in meters

Error Type: ArgumentOutOfRangeException (The distance parameter is launched when it is less than 1m or greater than 1000km (over 1,000,000 metric).)

Error Type: NotSupportedException (Launch if the position is in the southern hemisphere or negative longitude.)


Method: Geoloc Move(Double, Double)

Coordinate calculates the new coordinates in meters.

Parameter Name Description
distanceInMeters Distance in meters
bearingInDegrees The angle in degrees (0: north, 90: east, 180: south, 270: west)

Error Type: ArgumentOutOfRangeException (The distance parameter is launched when it is less than 1m or greater than 1000km (over 1,000,000 metric).)

Error Type: NotSupportedException (The position is launched if it is in the southern hemisphere or negative longitude.)


Method: string ToString()

Returns latitude and longitude information in (##.#######,##.#######) format.


Method: bool Equals(Object)

Returns true if the given object has the same value as the Geoloc object and the data, false otherwise.

Parameter Name Description
obj Object to be compared

Method: bool Equals(Geoloc)

Returns true if the given Geoloc object has the same value as the data, false otherwise.

Parameter Name Description
other The object of type Geoloc to be compared