Table of Contents

Class Projection

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll
public class Projection
Inheritance
Projection
Inherited Members

Constructors

Projection()

public Projection()

Projection(int)

[Obsolete("This property is obfuscated and will be removed after v14.2. Please use Projection.ConvertEpsgToProjString() to get the proj string from an srid, or use Projection.ConvertProjStringToEpsg() to get the srid from a proj string")]
public Projection(int srid)

Parameters

srid int

Projection(string)

public Projection(string projString)

Parameters

projString string

Properties

ProjString

public string ProjString { get; set; }

Property Value

string

Srid

[Obsolete("This property is obfuscated and will be removed after v14.2. Please use Projection.ConvertEpsgToProjString() to get the proj string from an srid, or use Projection.ConvertProjStringToEpsg() to get the srid from a proj string")]
public int Srid { get; set; }

Property Value

int

Methods

ConvertEpsgToProjString(int)

public static string ConvertEpsgToProjString(int srid)

Parameters

srid int

Returns

string

ConvertEpsgToWkt(int)

This method is a static API to get a Prj string by Epsg number

public static string ConvertEpsgToWkt(int srid)

Parameters

srid int

Epsg number that reprents this projection

Returns

string

ConvertProjStringToEpsg(string)

public static int ConvertProjStringToEpsg(string projString)

Parameters

projString string

Returns

int

ConvertProjStringToWkt(string)

public static string ConvertProjStringToWkt(string projString)

Parameters

projString string

Returns

string

ConvertWktToProjString(string)

public static string ConvertWktToProjString(string wkt)

Parameters

wkt string

Returns

string

GetBingMapProjString()

This method is a static API to get a projection used by BingMaps.

public static string GetBingMapProjString()

Returns

string

A text for a projection used by BingMaps , it should like this "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"

GetDecimalDegreesProjString()

public static string GetDecimalDegreesProjString()

Returns

string

GetEpsgSridByProjString(string)

public static int GetEpsgSridByProjString(string projString)

Parameters

projString string

Returns

int

GetEsriSridByProjString(string)

public static int GetEsriSridByProjString(string projString)

Parameters

projString string

Returns

int

GetGeographyUnit(int)

public static GeographyUnit GetGeographyUnit(int srid)

Parameters

srid int

Returns

GeographyUnit

GetGeographyUnit(string)

public static GeographyUnit GetGeographyUnit(string projString)

Parameters

projString string

Returns

GeographyUnit

GetGeographyUnitFromProj(string)

public static GeographyUnit GetGeographyUnitFromProj(string projString)

Parameters

projString string

Returns

GeographyUnit

GetGeographyUnitFromWkb(string)

public static GeographyUnit GetGeographyUnitFromWkb(string wkt)

Parameters

wkt string

Returns

GeographyUnit

GetGoogleMapProjString()

This method is a static API to get a projection used by GoogleMap.

public static string GetGoogleMapProjString()

Returns

string

A text for a projection used by GoogleMap , it should like this "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"

GetLatLongProjString()

public static string GetLatLongProjString()

Returns

string

GetLocalUtmZoneNumber(double, double)

public static int GetLocalUtmZoneNumber(double latitude, double longitude)

Parameters

latitude double
longitude double

Returns

int

GetLocalUtmZoneNumber(BaseShape, int)

public static int GetLocalUtmZoneNumber(BaseShape shape, int srid)

Parameters

shape BaseShape
srid int

Returns

int

GetLocalUtmZoneNumber(BaseShape, string)

public static int GetLocalUtmZoneNumber(BaseShape shape, string projString)

Parameters

shape BaseShape
projString string

Returns

int

GetLocalUtmZoneNumber(Feature, int)

public static int GetLocalUtmZoneNumber(Feature feature, int srid)

Parameters

feature Feature
srid int

Returns

int

GetLocalUtmZoneNumber(Feature, string)

public static int GetLocalUtmZoneNumber(Feature feature, string projString)

Parameters

feature Feature
projString string

Returns

int

GetLocalUtmZoneProjString(double, double)

public static string GetLocalUtmZoneProjString(double latitude, double longitude)

Parameters

latitude double
longitude double

Returns

string

GetLocalUtmZoneProjString(BaseShape, int)

public static string GetLocalUtmZoneProjString(BaseShape shape, int srid)

Parameters

shape BaseShape
srid int

Returns

string

GetLocalUtmZoneProjString(BaseShape, string)

public static string GetLocalUtmZoneProjString(BaseShape shape, string projString)

Parameters

shape BaseShape
projString string

Returns

string

GetLocalUtmZoneProjString(BaseShape, Projection)

public static string GetLocalUtmZoneProjString(BaseShape shape, Projection projection)

Parameters

shape BaseShape
projection Projection

Returns

string

GetLocalUtmZoneProjString(Feature, int)

public static string GetLocalUtmZoneProjString(Feature feature, int srid)

Parameters

feature Feature
srid int

Returns

string

GetLocalUtmZoneProjString(Feature, string)

public static string GetLocalUtmZoneProjString(Feature feature, string projString)

Parameters

feature Feature
projString string

Returns

string

GetProjStringByEpsgSrid(int)

This method is a static API to get a projection text from EPSG(European Petroleum Survey Group).

public static string GetProjStringByEpsgSrid(int srid)

Parameters

srid int

The target Srid information to get the projection text from.

Returns

string

The project text corresponding to the srid.

Remarks

More information about it can reference to EPSG.rtf in the documentation.

GetProjStringByEsriSrid(int)

This method is a static API to get a projection text from ERSI.

public static string GetProjStringByEsriSrid(int srid)

Parameters

srid int

The target Srid infromation to get the projection text from.

Returns

string

The project text corresponding to the srid.

Remarks

More information about it can reference to ERSI.rtf in the documentation.

GetSphericalMercatorProjString()

This method is a static API to get a projection of SphericalMercator.

public static string GetSphericalMercatorProjString()

Returns

string

A text for a SphericalMercator projection, it should like this "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"

GetUnit()

public GeographyUnit GetUnit()

Returns

GeographyUnit

GetWgs84ProjString()

This method is a static API to get a projection text from WGS84.

public static string GetWgs84ProjString()

Returns

string

The WGS84 proj string.