ee.Geometry.LineString
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้าง ee.Geometry ที่อธิบาย LineString
เพื่อความสะดวก คุณอาจใช้ varargs เมื่ออาร์กิวเมนต์ทั้งหมดเป็นตัวเลข ซึ่งช่วยให้สร้าง LineString ของ EPSG:4326 ทรงลูกโลกได้เมื่อมีอาร์กิวเมนต์เป็นจำนวนคู่ เช่น ee.Geometry.LineString(aLng, aLat, bLng, bLat, ...)
การใช้งาน | การคืนสินค้า |
---|
ee.Geometry.LineString(coords, proj, geodesic, maxError) | Geometry.LineString |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
coords | List<Geometry>|List<List<Number>>|List<Number> | รายการที่มีอย่างน้อย 2 จุด อาจเป็นรายการพิกัดในรูปแบบ GeoJSON "LineString", รายการออบเจ็กต์ ee.Geometry อย่างน้อย 2 รายการที่อธิบายจุด หรือรายการตัวเลขอย่างน้อย 4 รายการที่กำหนดพิกัด [x,y] ของจุดอย่างน้อย 2 จุด |
proj | การคาดการณ์ (ไม่บังคับ) | การฉายเรขาคณิตนี้ หากไม่ระบุ ระบบจะใช้การฉายภาพของ ee.Geometry อินพุต หรือ EPSG:4326 หากไม่มีอินพุต ee.Geometry |
geodesic | บูลีน ไม่บังคับ | หากเป็นเท็จ ขอบจะตรงในการฉายภาพ หากเป็นจริง เส้นขอบจะโค้งตามเส้นทางที่สั้นที่สุดบนพื้นผิวโลก ค่าเริ่มต้นคือสถานะทางภูมิศาสตร์ของอินพุต หรือเป็นจริงหากอินพุตเป็นตัวเลข |
maxError | ErrorMargin (ไม่บังคับ) | ข้อผิดพลาดสูงสุดเมื่อต้องฉายเรขาคณิตอินพุตใหม่ไปยังการฉายผลลัพธ์หรือสถานะทางภูมิศาสตร์ที่ขออย่างชัดเจน |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eCreates a LineString geometry, which represents a line segment on Earth's surface.\u003c/p\u003e\n"],["\u003cp\u003eAccepts a list of coordinates, projection, geodesic setting, and error margin for construction.\u003c/p\u003e\n"],["\u003cp\u003eAllows convenient creation of geodesic lines using coordinate pairs (longitude, latitude).\u003c/p\u003e\n"],["\u003cp\u003eDefaults to EPSG:4326 projection if no input geometry's projection is specified.\u003c/p\u003e\n"],["\u003cp\u003eEnables both straight and curved line representations based on the \u003ccode\u003egeodesic\u003c/code\u003e parameter.\u003c/p\u003e\n"]]],[],null,["# ee.Geometry.LineString\n\n\u003cbr /\u003e\n\nConstructs an ee.Geometry describing a LineString.\n\n\u003cbr /\u003e\n\nFor convenience, varargs may be used when all arguments are numbers. This allows creating geodesic EPSG:4326 LineStrings given an even number of arguments, e.g. ee.Geometry.LineString(aLng, aLat, bLng, bLat, ...).\n\n| Usage | Returns |\n|--------------------------------------------------------------------------|---------------------|\n| `ee.Geometry.LineString(coords, `*proj* `, `*geodesic* `, `*maxError*`)` | Geometry.LineString |\n\n| Argument | Type | Details |\n|------------|----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `coords` | List\\\u003cGeometry\\\u003e\\|List\\\u003cList\\\u003cNumber\\\u003e\\\u003e\\|List\\\u003cNumber\\\u003e | A list of at least two points. May be a list of coordinates in the GeoJSON 'LineString' format, a list of at least two ee.Geometry objects describing a point, or a list of at least four numbers defining the \\[x,y\\] coordinates of at least two points. |\n| `proj` | Projection, optional | The projection of this geometry. If unspecified, the default is the projection of the input ee.Geometry, or EPSG:4326 if there are no ee.Geometry inputs. |\n| `geodesic` | Boolean, optional | If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers. |\n| `maxError` | ErrorMargin, optional | Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state. |"]]