ee.Projection

แสดงผลการฉายภาพที่มีระบบพิกัดฐานที่กำหนดและการแปลงที่กำหนดระหว่างพิกัดที่ฉายและฐาน หากไม่ได้ระบุการเปลี่ยนรูปแบบ ระบบจะถือว่าเป็นการเปลี่ยนรูปแบบเอกลักษณ์

การใช้งานการคืนสินค้า
ee.Projection(crs, transform, transformWkt)การฉายภาพ
อาร์กิวเมนต์ประเภทรายละเอียด
crsวัตถุระบบอ้างอิงพิกัดฐานของการฉายภาพนี้ ซึ่งระบุเป็นรหัสหน่วยงานที่รู้จักกันดี (เช่น "EPSG:4326") หรือสตริง WKT
transformรายการ (ค่าเริ่มต้น: null)การแปลงระหว่างพิกัดที่ฉายและระบบพิกัดฐาน ซึ่งระบุเป็นเมทริกซ์การแปลงแบบแอฟฟิน 2x3 ในลำดับแถวหลัก: [xScale, xShearing, xTranslation, yShearing, yScale, yTranslation] ระบุทั้งนี้และ "transformWkt" พร้อมกันไม่ได้
transformWktสตริง ค่าเริ่มต้น: nullการแปลงระหว่างพิกัดที่ฉายและระบบพิกัดฐาน ซึ่งระบุเป็นสตริง 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

การตั้งค่า Python

ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า สภาพแวดล้อม Python

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