/// <summary> /// Gets the projection info. /// </summary> /// <returns>The projection info.</returns> public ProjectionInfo GetProj4ProjectionInfo() { string sProj4String; //SpatialReference osrSpatialref = _ogrLayer.GetSpatialRef(); // CGX OSGeo.OSR.SpatialReference osrSpatialref = _ogrLayer.GetSpatialRef(); osrSpatialref.ExportToProj4(out sProj4String); return(ProjectionInfo.FromProj4String(sProj4String)); }
public static string ToProj4(string wkt) { if (string.IsNullOrEmpty(wkt)) return wkt; using (SpatialReference sr = new SpatialReference(wkt)) { string res = null; sr.ExportToProj4(out res); return res; } }