C# Class ArcStache.WebMercatorUtil

Utility class for projecting coordinates from geographic (4326) to web mercator (102100) and back.
Show file Open project: dtsagile/arcstache Class Usage Examples

Public Properties

Property Type Description
GEOGRAPHIC_WKID int
WEBMERCATOR_WKID int

Public Methods

Method Description
GeographicToWebMercator ( double latitude, double longitude ) : Point

Converts a coordinate pair in geographic projection (WKID 4326) to web mercator auxillary sphere (102100).

LatitudeToY ( double latitude ) : double
LongitudeToX ( double longitude ) : double
WebMercatorToGeographic ( double x, double y ) : Point

Converts a coordinate pair in web mercator auxillary sphere projection (WKID 102100) to geographic (4326).

XToLongitude ( double x ) : double
YToLatitude ( double y ) : double

Method Details

GeographicToWebMercator() public static method

Converts a coordinate pair in geographic projection (WKID 4326) to web mercator auxillary sphere (102100).
public static GeographicToWebMercator ( double latitude, double longitude ) : Point
latitude double The latitude coordinate.
longitude double The longitude coordinate.
return Point

LatitudeToY() public static method

public static LatitudeToY ( double latitude ) : double
latitude double
return double

LongitudeToX() public static method

public static LongitudeToX ( double longitude ) : double
longitude double
return double

WebMercatorToGeographic() public static method

Converts a coordinate pair in web mercator auxillary sphere projection (WKID 102100) to geographic (4326).
public static WebMercatorToGeographic ( double x, double y ) : Point
x double The x coordinate.
y double The y coordinate.
return Point

XToLongitude() public static method

public static XToLongitude ( double x ) : double
x double
return double

YToLatitude() public static method

public static YToLatitude ( double y ) : double
y double
return double

Property Details

GEOGRAPHIC_WKID public static property

public static int GEOGRAPHIC_WKID
return int

WEBMERCATOR_WKID public static property

public static int WEBMERCATOR_WKID
return int