C# 클래스 csShared.Utils.CoordinateUtils

파일 보기 프로젝트 열기: TNOCS/csTouch 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MConvertLatLongStringToDouble System.Text.RegularExpressions.Regex

공개 메소드들

메소드 설명
Area ( List Points ) : double
AreaLatLon ( List Points ) : double
Bearing ( double pLat1, double pLon1, double pLat2, double pLon2 ) : double

Calculates the bearing in degrees for the line from point 1 (lat1, lon1) to point 2 (lat2, lon2).

CalculatePointSphere2D ( double pLatitudeDeg, double pLongitudeDeg, double pDistance, double pAngleDeg, double &pNewLatitudeDegrees, double &pNewLongitudeDegrees ) : void

Translates a position, spherical implementation The position in translated in the azimuth direction of the angle x, y and by a distance of sqrt(x^2, Y^2).

CheckCoordinate ( CoordinateType pCoordinateType, CoordinateDirection pCoordinateDirection, string pValue ) : string

Checks the range of the coordinate and returns the error message if not OK.

ConvertCoordinateFromXY ( BoundingBox box, CoordinateType coordinateType ) : BoundingBox

Converts the coordinate from raw (map) format to the selected coordinate unit.

ConvertCoordinateFromXY ( SharpMap point, CoordinateType coordinateType ) : SharpMap.Geometries.System.Windows.Point

Converts the coordinate from raw (map) format to the selected coordinate unit.

ConvertCoordinateToXY ( BoundingBox box, CoordinateType coordinateType ) : BoundingBox

Converts the coordinate from the selected coordinate unit to raw (map) format.

ConvertCoordinateToXY ( SharpMap point, CoordinateType coordinateType ) : SharpMap.Geometries.System.Windows.Point

Converts the coordinate from the selected coordinate unit to raw (map) format.

ConvertRDToLonLat ( double x, double y, double &longitude, double &latitude ) : void

Convert RD (rijksdriehoek) to WGS84.

CoordinateToString ( CoordinateType pCoordinateType, double pLatitude, double pLongitude, string &pWestEastValue, string &pNorthSouthValue ) : void

Formats the coordinate according to current setting.

DecimalDegreestoDegreeMinuteSecond ( double pCoordinate, CoordinateDirection pCoordinateDirection ) : string

Convert decimal degrees (DD) to degree, minute, second (DMS) notation.

Deg2Rad ( double pDegrees ) : double
Distance ( System.Windows.Point pPoint1, System.Windows.Point pPoint2 ) : double

Calculates the distance between the specified point1 and point2.

Distance ( double pLat1, double pLon1, double pLat2, double pLon2, char pUnit = 'K' ) : double

Calculates the distance between the specified point1 (lat1, lon1) and point2 (lat2, lon2).

FormattedCoordinateToDouble ( CoordinateType pCoordinateType, string pWestEastValue, string pNorthSouthValue, double &pLatitude, double &pLongitude ) : void

Retrieves latitude and longitude in degrees from the string values presented in the given coordinate type.

LatLon2Rd ( System.Windows.Point pLatLon ) : System.Windows.Point

Convert a lat/lon point to a RD point.

LatLonDeg2Rd ( System.Windows.Point pLatLon ) : System.Windows.Point

Convert a lat/lon point to a RD point.

LatLonDegreesToXYPoint ( double pLatitude, double pLongitude ) : System.Windows.Point

Converts the latitude longitude in degrees to XY point.

LatLonRadToXYPoint ( double pLatitude, double pLongitude ) : System.Windows.Point

Converts the latitude and longitude in radians to XYPoint.

LatitudeLongitudeDegreesFromLatitudeLongitudeString ( string pLatitude, string pLongitude ) : System.Windows.Point

Gets the latitude and the longitude in degrees from a latitude longitude string.

LonLat2Rd ( double pLongitude, double pLatitude, double &pRdX, double &pRdY ) : void

Convert longitude/latitude to 'Rijksdriehoek' coordinates.

RD2lat ( double b, double c ) : double
RD2lng ( double b, double c ) : double
Rad2Deg ( double pRadians ) : double
Rd2LonLat ( double pRdX, double pRdY ) : Position

Convert 'Rijksdriehoek' coordinates to longitude/latitude in degrees.

Rd2LonLat ( double pRdX, double pRdY, double &pLongitude, double &pLatitude ) : void

Convert 'Rijksdriehoek' coordinates to longitude/latitude in degrees.

Rd2LonLat2 ( double pRdX, double pRdY, double &pLongitude, double &pLatitude ) : void
Rd2LonLatAsPoint ( double pRdX, double pRdY ) : System.Windows.Point

Convert 'Rijksdriehoek' coordinates to longitude/latitude in degrees.

TransformCoordinates ( List points, int sourceProjection, int destProjection ) : List
TransformCoordinates ( List points, string sourceProjection, string destProjection ) : List
XYPointToLatLonDegrees ( double pX, double pY, double &pLatitude, double &pLongitude ) : void

Converts the XYPoint to latitude longitude in degrees.

XYPointToLatLonRad ( double pX, double pY, double &pLatitude, double &pLongitude ) : void

Converts the XYPoint to latitude longitude in radians.

비공개 메소드들

메소드 설명
GetCoordinateDegreesFromDegreeMinuteSecond ( string pValue ) : double

Gets the coordinate degrees from degree minute second.

pj_free ( IntPtr pointer ) : void
pj_init_plus ( string init ) : IntPtr
pj_is_latlong ( IntPtr coordPointer ) : int
pj_transform ( IntPtr srcPrj, IntPtr destPrj, int nPoints, int offset, double &x, double &y, double &z ) : int

메소드 상세

Area() 공개 정적인 메소드

public static Area ( List Points ) : double
Points List
리턴 double

AreaLatLon() 공개 정적인 메소드

public static AreaLatLon ( List Points ) : double
Points List
리턴 double

Bearing() 공개 정적인 메소드

Calculates the bearing in degrees for the line from point 1 (lat1, lon1) to point 2 (lat2, lon2).
public static Bearing ( double pLat1, double pLon1, double pLat2, double pLon2 ) : double
pLat1 double
pLon1 double
pLat2 double
pLon2 double
리턴 double

CalculatePointSphere2D() 공개 정적인 메소드

Translates a position, spherical implementation The position in translated in the azimuth direction of the angle x, y and by a distance of sqrt(x^2, Y^2).
public static CalculatePointSphere2D ( double pLatitudeDeg, double pLongitudeDeg, double pDistance, double pAngleDeg, double &pNewLatitudeDegrees, double &pNewLongitudeDegrees ) : void
pLatitudeDeg double Latitude of start coordinate in degrees.
pLongitudeDeg double Longitude of start coordinate in degrees.
pDistance double The distance to move in meters.
pAngleDeg double The angle to move under in degrees.
pNewLatitudeDegrees double The p new latitude degrees.
pNewLongitudeDegrees double The p new longitude degrees.
리턴 void

CheckCoordinate() 공개 정적인 메소드

Checks the range of the coordinate and returns the error message if not OK.
public static CheckCoordinate ( CoordinateType pCoordinateType, CoordinateDirection pCoordinateDirection, string pValue ) : string
pCoordinateType CoordinateType Type of the coordinate.
pCoordinateDirection CoordinateDirection The coordinate direction.
pValue string The value.
리턴 string

ConvertCoordinateFromXY() 공개 정적인 메소드

Converts the coordinate from raw (map) format to the selected coordinate unit.
public static ConvertCoordinateFromXY ( BoundingBox box, CoordinateType coordinateType ) : BoundingBox
box BoundingBox The box.
coordinateType CoordinateType Type of the coordinate.
리턴 BoundingBox

ConvertCoordinateFromXY() 공개 정적인 메소드

Converts the coordinate from raw (map) format to the selected coordinate unit.
public static ConvertCoordinateFromXY ( SharpMap point, CoordinateType coordinateType ) : SharpMap.Geometries.System.Windows.Point
point SharpMap The point.
coordinateType CoordinateType Type of the coordinate.
리턴 SharpMap.Geometries.System.Windows.Point

ConvertCoordinateToXY() 공개 정적인 메소드

Converts the coordinate from the selected coordinate unit to raw (map) format.
public static ConvertCoordinateToXY ( BoundingBox box, CoordinateType coordinateType ) : BoundingBox
box BoundingBox The box.
coordinateType CoordinateType Type of the coordinate.
리턴 BoundingBox

ConvertCoordinateToXY() 공개 정적인 메소드

Converts the coordinate from the selected coordinate unit to raw (map) format.
public static ConvertCoordinateToXY ( SharpMap point, CoordinateType coordinateType ) : SharpMap.Geometries.System.Windows.Point
point SharpMap The point.
coordinateType CoordinateType Type of the coordinate.
리턴 SharpMap.Geometries.System.Windows.Point

ConvertRDToLonLat() 공개 정적인 메소드

Convert RD (rijksdriehoek) to WGS84.
public static ConvertRDToLonLat ( double x, double y, double &longitude, double &latitude ) : void
x double X in RD
y double Y in RD
longitude double Longitude in WGS84
latitude double Latitude in WGS84
리턴 void

CoordinateToString() 공개 정적인 메소드

Formats the coordinate according to current setting.
public static CoordinateToString ( CoordinateType pCoordinateType, double pLatitude, double pLongitude, string &pWestEastValue, string &pNorthSouthValue ) : void
pCoordinateType CoordinateType Type of the coordinate.
pLatitude double The latitude in degrees.
pLongitude double The longitude in degrees.
pWestEastValue string The west east value in the specified format.
pNorthSouthValue string The north south value in the specified format.
리턴 void

DecimalDegreestoDegreeMinuteSecond() 공개 정적인 메소드

Convert decimal degrees (DD) to degree, minute, second (DMS) notation.
public static DecimalDegreestoDegreeMinuteSecond ( double pCoordinate, CoordinateDirection pCoordinateDirection ) : string
pCoordinate double The Coordinate.
pCoordinateDirection CoordinateDirection The direction.
리턴 string

Deg2Rad() 공개 정적인 메소드

public static Deg2Rad ( double pDegrees ) : double
pDegrees double
리턴 double

Distance() 공개 정적인 메소드

Calculates the distance between the specified point1 and point2.
public static Distance ( System.Windows.Point pPoint1, System.Windows.Point pPoint2 ) : double
pPoint1 System.Windows.Point The point1.
pPoint2 System.Windows.Point The point2.
리턴 double

Distance() 공개 정적인 메소드

Calculates the distance between the specified point1 (lat1, lon1) and point2 (lat2, lon2).
public static Distance ( double pLat1, double pLon1, double pLat2, double pLon2, char pUnit = 'K' ) : double
pLat1 double The lat1.
pLon1 double The lon1.
pLat2 double The lat2.
pLon2 double The lon2.
pUnit char The unit (K for kilometers (default), N for nautical miles, or M for miles (default)).
리턴 double

FormattedCoordinateToDouble() 공개 정적인 메소드

Retrieves latitude and longitude in degrees from the string values presented in the given coordinate type.
public static FormattedCoordinateToDouble ( CoordinateType pCoordinateType, string pWestEastValue, string pNorthSouthValue, double &pLatitude, double &pLongitude ) : void
pCoordinateType CoordinateType Type of the coordinate.
pWestEastValue string The west east value.
pNorthSouthValue string The north south value.
pLatitude double The latitude in degrees.
pLongitude double The longitude in degrees.
리턴 void

LatLon2Rd() 공개 정적인 메소드

Convert a lat/lon point to a RD point.
public static LatLon2Rd ( System.Windows.Point pLatLon ) : System.Windows.Point
pLatLon System.Windows.Point The lat lon point. (x=latitude, y=longitude and in radian)
리턴 System.Windows.Point

LatLonDeg2Rd() 공개 정적인 메소드

Convert a lat/lon point to a RD point.
public static LatLonDeg2Rd ( System.Windows.Point pLatLon ) : System.Windows.Point
pLatLon System.Windows.Point The lat lon point. (x=latitude, y=longitude and in degrees)
리턴 System.Windows.Point

LatLonDegreesToXYPoint() 공개 정적인 메소드

Converts the latitude longitude in degrees to XY point.
public static LatLonDegreesToXYPoint ( double pLatitude, double pLongitude ) : System.Windows.Point
pLatitude double The p lat.
pLongitude double The p lon.
리턴 System.Windows.Point

LatLonRadToXYPoint() 공개 정적인 메소드

Converts the latitude and longitude in radians to XYPoint.
public static LatLonRadToXYPoint ( double pLatitude, double pLongitude ) : System.Windows.Point
pLatitude double The lat.
pLongitude double The lon.
리턴 System.Windows.Point

LatitudeLongitudeDegreesFromLatitudeLongitudeString() 공개 정적인 메소드

Gets the latitude and the longitude in degrees from a latitude longitude string.
public static LatitudeLongitudeDegreesFromLatitudeLongitudeString ( string pLatitude, string pLongitude ) : System.Windows.Point
pLatitude string The latitude string.
pLongitude string The longitude string.
리턴 System.Windows.Point

LonLat2Rd() 공개 정적인 메소드

Convert longitude/latitude to 'Rijksdriehoek' coordinates.
public static LonLat2Rd ( double pLongitude, double pLatitude, double &pRdX, double &pRdY ) : void
pLongitude double The longitude in degrees.
pLatitude double The latitude in degrees.
pRdX double The resulting 'Rijksdriehoek' X.
pRdY double The resulting 'Rijksdriehoek' Y.
리턴 void

RD2lat() 공개 정적인 메소드

public static RD2lat ( double b, double c ) : double
b double
c double
리턴 double

RD2lng() 공개 정적인 메소드

public static RD2lng ( double b, double c ) : double
b double
c double
리턴 double

Rad2Deg() 공개 정적인 메소드

public static Rad2Deg ( double pRadians ) : double
pRadians double
리턴 double

Rd2LonLat() 공개 정적인 메소드

Convert 'Rijksdriehoek' coordinates to longitude/latitude in degrees.
public static Rd2LonLat ( double pRdX, double pRdY ) : Position
pRdX double The 'Rijksdriehoek' X.
pRdY double The 'Rijksdriehoek' Y.
리턴 DataServer.Position

Rd2LonLat() 공개 정적인 메소드

Convert 'Rijksdriehoek' coordinates to longitude/latitude in degrees.
public static Rd2LonLat ( double pRdX, double pRdY, double &pLongitude, double &pLatitude ) : void
pRdX double The 'Rijksdriehoek' X.
pRdY double The 'Rijksdriehoek' Y.
pLongitude double The resulting longitude in degrees.
pLatitude double The resulting latitude in degrees.
리턴 void

Rd2LonLat2() 공개 정적인 메소드

public static Rd2LonLat2 ( double pRdX, double pRdY, double &pLongitude, double &pLatitude ) : void
pRdX double
pRdY double
pLongitude double
pLatitude double
리턴 void

Rd2LonLatAsPoint() 공개 정적인 메소드

Convert 'Rijksdriehoek' coordinates to longitude/latitude in degrees.
public static Rd2LonLatAsPoint ( double pRdX, double pRdY ) : System.Windows.Point
pRdX double The 'Rijksdriehoek' X.
pRdY double The 'Rijksdriehoek' Y.
리턴 System.Windows.Point

TransformCoordinates() 공개 정적인 메소드

public static TransformCoordinates ( List points, int sourceProjection, int destProjection ) : List
points List
sourceProjection int
destProjection int
리턴 List

TransformCoordinates() 공개 정적인 메소드

public static TransformCoordinates ( List points, string sourceProjection, string destProjection ) : List
points List
sourceProjection string
destProjection string
리턴 List

XYPointToLatLonDegrees() 공개 정적인 메소드

Converts the XYPoint to latitude longitude in degrees.
public static XYPointToLatLonDegrees ( double pX, double pY, double &pLatitude, double &pLongitude ) : void
pX double The X.
pY double The Y.
pLatitude double The resulting latitude in degrees.
pLongitude double The resulting longitude in degrees.
리턴 void

XYPointToLatLonRad() 공개 정적인 메소드

Converts the XYPoint to latitude longitude in radians.
public static XYPointToLatLonRad ( double pX, double pY, double &pLatitude, double &pLongitude ) : void
pX double The X.
pY double The Y.
pLatitude double The resulting latitude.
pLongitude double The resulting longitude.
리턴 void

프로퍼티 상세

MConvertLatLongStringToDouble 공개적으로 정적으로 프로퍼티

Convert a string such as 039°32'09,90 to a double A description of the regular expression: 0, zero or one repetitions [Degrees]: A named capture group. [\d{1,3}] Any digit, between 1 and 3 repetitions °0? °0, zero or one repetitions [Minutes]: A named capture group. [\d{1,2}] Any digit, between 1 and 2 repetitions '0? '0, zero or one repetitions [Seconds]: A named capture group. [\d{1,2}[.,]?\d*] \d{1,2}[.,]?\d* Any digit, between 1 and 2 repetitions Any character in this class: [.,], zero or one repetitions Any digit, any number of repetitions
public static Regex,System.Text.RegularExpressions MConvertLatLongStringToDouble
리턴 System.Text.RegularExpressions.Regex