| 用量 | 傳回 |
|---|---|
ee.Projection(crs, transform, transformWkt) | 預測值 |
| 引數 | 類型 | 詳細資料 |
|---|---|---|
crs | 物件 | 這個投影的基準座標參考系統,以知名授權單位代碼的形式提供 (例如 「EPSG:4326」) 或 WKT 字串。 |
transform | 清單,預設值為空值 | 投影座標與基本座標系統之間的轉換,以資料列主要順序指定為 2x3 仿射轉換矩陣:[xScale、xShearing、xTranslation、yShearing、yScale、yTranslation]。不得同時指定這個屬性和「transformWkt」。 |
transformWkt | 字串,預設值為空值 | 投影座標與基本座標系統之間的轉換,以 WKT 字串形式指定。不得同時指定這個屬性和「transform」。 |
範例
程式碼編輯器 (JavaScript)
// Construct projections. // Printing the projection will show the EPSG code if it is a direct match. // // e.g. You will see this for the string 'EPSG:3857' // type: Projection // crs: EPSG:3857 // transform: [1,0,0,0,1,0] print(ee.Projection('EPSG:3857')); // https://epsg.io/3857 print(ee.Projection('EPSG:4326')); // https://epsg.io/4326 // WKT projection description for https://epsg.io/27572 var proj = ee.Projection( 'PROJCS["NTF (Paris) / Lambert zone II", ' + ' GEOGCS["NTF (Paris)", ' + ' DATUM["Nouvelle Triangulation Francaise (Paris)", ' + ' SPHEROID["Clarke 1880 (IGN)", 6378249.2, 293.4660212936269,'+ ' AUTHORITY["EPSG","7011"]], ' + ' AUTHORITY["EPSG","6807"]], ' + ' PRIMEM["Paris", 2.5969213, AUTHORITY["EPSG","8903"]], ' + ' UNIT["grade", 0.015707963267948967], ' + ' AXIS["Geodetic longitude", EAST], ' + ' AXIS["Geodetic latitude", NORTH], ' + ' AUTHORITY["EPSG","4807"]], ' + ' PROJECTION["Lambert_Conformal_Conic_1SP", AUTHORITY["EPSG","9801"]], ' + ' PARAMETER["central_meridian", 0.0], ' + ' PARAMETER["latitude_of_origin", 52.0], ' + ' PARAMETER["scale_factor", 0.99987742], ' + ' PARAMETER["false_easting", 600000.0], ' + ' PARAMETER["false_northing", 2200000.0], ' + ' UNIT["m", 1.0], ' + ' AXIS["Easting", EAST], ' + ' AXIS["Northing", NORTH], ' + ' AUTHORITY["EPSG","27572"]]'); print(proj); // crs: EPSG:27572
import ee import geemap.core as geemap
Colab (Python)
# Construct projections. # Printing the projection will show the EPSG code if it is a direct match. # # e.g. You will see this for the string 'EPSG:3857' # type: Projection # crs: EPSG:3857 # transform: [1,0,0,0,1,0] print(ee.Projection('EPSG:3857').getInfo()) # https://epsg.io/3857 print(ee.Projection('EPSG:4326').getInfo()) # https://epsg.io/4326 # WKT projection description for https://epsg.io/27572 proj = ee.Projection( 'PROJCS["NTF (Paris) / Lambert zone II", ' + ' GEOGCS["NTF (Paris)", ' + ' DATUM["Nouvelle Triangulation Francaise (Paris)", ' + ' SPHEROID["Clarke 1880 (IGN)", 6378249.2, 293.4660212936269,'+ ' AUTHORITY["EPSG","7011"]], ' + ' AUTHORITY["EPSG","6807"]], ' + ' PRIMEM["Paris", 2.5969213, AUTHORITY["EPSG","8903"]], ' + ' UNIT["grade", 0.015707963267948967], ' + ' AXIS["Geodetic longitude", EAST], ' + ' AXIS["Geodetic latitude", NORTH], ' + ' AUTHORITY["EPSG","4807"]], ' + ' PROJECTION["Lambert_Conformal_Conic_1SP", AUTHORITY["EPSG","9801"]], ' + ' PARAMETER["central_meridian", 0.0], ' + ' PARAMETER["latitude_of_origin", 52.0], ' + ' PARAMETER["scale_factor", 0.99987742], ' + ' PARAMETER["false_easting", 600000.0], ' + ' PARAMETER["false_northing", 2200000.0], ' + ' UNIT["m", 1.0], ' + ' AXIS["Easting", EAST], ' + ' AXIS["Northing", NORTH], ' + ' AUTHORITY["EPSG","27572"]]') print(proj.getInfo()) # crs: EPSG:27572