Skip to content

Projection

Namespace: ThinkGeo.Core

public class Projection

Inheritance ObjectProjection

Properties

Srid

public int Srid { get; set; }

Property Value

Int32

ProjString

public string ProjString { get; set; }

Property Value

String

Constructors

Projection()

public Projection()

Projection(Int32)

public Projection(int srid)

Parameters

srid Int32

Projection(String)

public Projection(string projString)

Parameters

projString String

Methods

GetUnit()

public GeographyUnit GetUnit()

Returns

GeographyUnit

GetProjStringByEpsgSrid(Int32)

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 Int32
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.

GetEpsgSridByProjString(String)

public static int GetEpsgSridByProjString(string projString)

Parameters

projString String

Returns

Int32

GetProjStringByEsriSrid(Int32)

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

public static string GetProjStringByEsriSrid(int srid)

Parameters

srid Int32
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.

GetEsriSridByProjString(String)

public static int GetEsriSridByProjString(string projString)

Parameters

projString String

Returns

Int32

GetWgs84ProjString()

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

public static string GetWgs84ProjString()

Returns

String
The WGS84 proj string.

GetLatLongProjString()

public static string GetLatLongProjString()

Returns

String

GetDecimalDegreesProjString()

public static string GetDecimalDegreesProjString()

Returns

String

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"

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"

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"

GetLocalUtmZoneProjString(Double, Double)

public static string GetLocalUtmZoneProjString(double latitude, double longitude)

Parameters

latitude Double

longitude Double

Returns

String

GetLocalUtmZoneProjString(Feature, String)

public static string GetLocalUtmZoneProjString(Feature feature, string projString)

Parameters

feature Feature

projString String

Returns

String

GetLocalUtmZoneProjString(Feature, Int32)

public static string GetLocalUtmZoneProjString(Feature feature, int srid)

Parameters

feature Feature

srid Int32

Returns

String

GetLocalUtmZoneProjString(BaseShape, Projection)

public static string GetLocalUtmZoneProjString(BaseShape shape, Projection projection)

Parameters

shape BaseShape

projection Projection

Returns

String

GetLocalUtmZoneProjString(BaseShape, String)

public static string GetLocalUtmZoneProjString(BaseShape shape, string projString)

Parameters

shape BaseShape

projString String

Returns

String

GetLocalUtmZoneProjString(BaseShape, Int32)

public static string GetLocalUtmZoneProjString(BaseShape shape, int srid)

Parameters

shape BaseShape

srid Int32

Returns

String

GetLocalUtmZoneNumber(Double, Double)

public static int GetLocalUtmZoneNumber(double latitude, double longitude)

Parameters

latitude Double

longitude Double

Returns

Int32

GetLocalUtmZoneNumber(Feature, String)

public static int GetLocalUtmZoneNumber(Feature feature, string projString)

Parameters

feature Feature

projString String

Returns

Int32

GetLocalUtmZoneNumber(Feature, Int32)

public static int GetLocalUtmZoneNumber(Feature feature, int srid)

Parameters

feature Feature

srid Int32

Returns

Int32

GetLocalUtmZoneNumber(BaseShape, String)

public static int GetLocalUtmZoneNumber(BaseShape shape, string projString)

Parameters

shape BaseShape

projString String

Returns

Int32

GetLocalUtmZoneNumber(BaseShape, Int32)

public static int GetLocalUtmZoneNumber(BaseShape shape, int srid)

Parameters

shape BaseShape

srid Int32

Returns

Int32

GetGeographyUnitFromWkb(String)

public static GeographyUnit GetGeographyUnitFromWkb(string wkt)

Parameters

wkt String

Returns

GeographyUnit

GetGeographyUnitFromProj(String)

public static GeographyUnit GetGeographyUnitFromProj(string projString)

Parameters

projString String

Returns

GeographyUnit

ConvertEpsgToWkt(Int32)

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

public static string ConvertEpsgToWkt(int srid)

Parameters

srid Int32
Epsg number that reprents this projection

Returns

String

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

ConvertEpsgToProjString(Int32)

public static string ConvertEpsgToProjString(int srid)

Parameters

srid Int32

Returns

String

ConvertProjStringToEpsg(String)

public static int ConvertProjStringToEpsg(string projString)

Parameters

projString String

Returns

Int32

GetGeographyUnit(Int32)

public static GeographyUnit GetGeographyUnit(int srid)

Parameters

srid Int32

Returns

GeographyUnit

GetGeographyUnit(String)

public static GeographyUnit GetGeographyUnit(string projString)

Parameters

projString String

Returns

GeographyUnit