C# Class Azavea.Open.Reprojection.Reprojector

Static helper class for reprojecting points between various projection systems.
Exibir arquivo Open project: azavea/net-omgeo-reprojection

Public Properties

Property Type Description
NZGD2000 ICoordinateSystem
PAStatePlane ICoordinateSystem
WGS84 ICoordinateSystem
WebMercator ICoordinateSystem

Public Methods

Method Description
GetCoordinateSystemBySRID ( int srid ) : ICoordinateSystem

Return a coordinate system object given a SRID.

Reproject ( ICoordinateSystem from, ICoordinateSystem to, IPoint point ) : IPoint

Given a couple coordinate systems, projects a point from one to another.

Reproject ( ICoordinateSystem from, ICoordinateSystem to, double xLon, double yLat ) : Point

Given a pair of coordinate systems, projects a point from one to another.

ReprojectPAStatePlaneToWGS84 ( double x, double y ) : Point

Convert X / Y coordinates in PA State Plane South projection (feet) to lat/long decimal degree coordinates (WGS84 datum).

ReprojectWGS84ToPAStatePlane ( double lon, double lat ) : Point

Convert lat/long decimal degree coordinates (WGS84 datum) to X / Y coordinates in PA State Plane South projection (feet).

ReprojectWGS84ToWebMercator ( double lon, double lat ) : Point

Convert lat/long decimal degree coordinates (WGS84 datum) to X / Y coordinates in Web Mercator projection (meters). Note that this is a manual re-projection and does not use PROJ.Net.

ReprojectWebMercatorToWGS84 ( double x, double y ) : Point

Convert X / Y coordinates in Web Mercator projection (meters) to lat/long decimal degree coordinates (WGS84 datum). Note that this is a manual re-projection and does not use PROJ.Net.

Private Methods

Method Description
ConvertLatitudeToMercatorY ( double latitudeDegrees ) : double
ConvertLongitudeToMercatorX ( double longitudeDegrees ) : double
ConvertMercatorXToLongitude ( double x ) : double
ConvertMercatorYToLatitude ( double y ) : double

Method Details

GetCoordinateSystemBySRID() public static method

Return a coordinate system object given a SRID.
public static GetCoordinateSystemBySRID ( int srid ) : ICoordinateSystem
srid int Spatial Reference ID of the desired coordinate system
return ICoordinateSystem

Reproject() public static method

Given a couple coordinate systems, projects a point from one to another.
public static Reproject ( ICoordinateSystem from, ICoordinateSystem to, IPoint point ) : IPoint
from ICoordinateSystem The coordinate system which the point is in originally
to ICoordinateSystem The coordinate system into which the point will be reprojected
point IPoint The point to be reprojected
return IPoint

Reproject() public static method

Given a pair of coordinate systems, projects a point from one to another.
public static Reproject ( ICoordinateSystem from, ICoordinateSystem to, double xLon, double yLat ) : Point
from ICoordinateSystem The coordinate system from which to convert the point.
to ICoordinateSystem
xLon double The X or Longitude coordinate of the point to be reprojected
yLat double The Y or Latitude coordinate of the point to be reprojected
return Point

ReprojectPAStatePlaneToWGS84() public static method

Convert X / Y coordinates in PA State Plane South projection (feet) to lat/long decimal degree coordinates (WGS84 datum).
public static ReprojectPAStatePlaneToWGS84 ( double x, double y ) : Point
x double x value in feet for PA State Plane South projection
y double y value in feet for PA State Plane South projection
return Point

ReprojectWGS84ToPAStatePlane() public static method

Convert lat/long decimal degree coordinates (WGS84 datum) to X / Y coordinates in PA State Plane South projection (feet).
public static ReprojectWGS84ToPAStatePlane ( double lon, double lat ) : Point
lon double longitude in decimal degrees based on WGS84 horizontal datum
lat double latitude in decimal degrees based on WGS84 horizontal datum
return Point

ReprojectWGS84ToWebMercator() public static method

Convert lat/long decimal degree coordinates (WGS84 datum) to X / Y coordinates in Web Mercator projection (meters). Note that this is a manual re-projection and does not use PROJ.Net.
public static ReprojectWGS84ToWebMercator ( double lon, double lat ) : Point
lon double longitude in decimal degrees based on WGS84 horizontal datum
lat double latitude in decimal degrees based on WGS84 horizontal datum
return Point

ReprojectWebMercatorToWGS84() public static method

Convert X / Y coordinates in Web Mercator projection (meters) to lat/long decimal degree coordinates (WGS84 datum). Note that this is a manual re-projection and does not use PROJ.Net.
public static ReprojectWebMercatorToWGS84 ( double x, double y ) : Point
x double x value in meters for Spherical Mercator projection
y double y value in meters for Spherical Mercator projection
return Point

Property Details

NZGD2000 public_oe static_oe property

Coordinate system for New Zealand?.
public static ICoordinateSystem NZGD2000
return ICoordinateSystem

PAStatePlane public_oe static_oe property

Coordinate system for Pennsylvania State Plane South.
public static ICoordinateSystem PAStatePlane
return ICoordinateSystem

WGS84 public_oe static_oe property

Coordinate system for WGS84 (most common lat/lon projection).
public static ICoordinateSystem WGS84
return ICoordinateSystem

WebMercator public_oe static_oe property

Coordinate system for Web Mercator. This is not well defined, and needs a hack in the reprojector, but we still want to have the CoordinateSystem around nominally, so it can be used in the standard way.
public static ICoordinateSystem WebMercator
return ICoordinateSystem