ee.Feature.length
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zwraca długość liniowych części geometrii danego obiektu. Wielokątne części są ignorowane. Długość geometrii złożonych to suma długości ich komponentów.
Wykorzystanie | Zwroty |
---|
Feature.length(maxError, proj) | Liczba zmiennoprzecinkowa |
Argument | Typ | Szczegóły |
---|
to: feature | Element | Obiekt, z którego pochodzi geometria. |
maxError | ErrorMargin, domyślnie: null | Maksymalna dopuszczalna wartość błędu podczas wykonywania niezbędnej reprojekcji. |
proj | Prognoza, domyślnie: null | Jeśli zostanie podana, wynik będzie podany w jednostkach układu współrzędnych tej projekcji. W przeciwnym razie będzie podana w metrach. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eThis function calculates the total length of linear geometries within a given feature, excluding any polygonal parts.\u003c/p\u003e\n"],["\u003cp\u003eFor features with multiple geometries, the function sums the lengths of each individual component to determine the overall length.\u003c/p\u003e\n"],["\u003cp\u003eResults are given in meters by default, but can be specified in the units of a provided projection.\u003c/p\u003e\n"],["\u003cp\u003eAn optional error margin can be specified for handling reprojection, if needed.\u003c/p\u003e\n"]]],["The `Feature.length()` method calculates the total length of linear components within a feature's geometry, excluding polygonal parts. It returns a float value representing this length. The method accepts optional `maxError` and `proj` arguments. `maxError` defines the acceptable error during reprojection, and `proj` specifies the desired coordinate system for the output, defaulting to meters if unspecified. The feature itself is mandatory for which the length is calculated.\n"],null,["# ee.Feature.length\n\nReturns the length of the linear parts of the geometry of a given feature. Polygonal parts are ignored. The length of multi geometries is the sum of the lengths of their components.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------|---------|\n| Feature.length`(`*maxError* `, `*proj*`)` | Float |\n\n| Argument | Type | Details |\n|-----------------|----------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| this: `feature` | Element | The feature from which the geometry is taken. |\n| `maxError` | ErrorMargin, default: null | The maximum amount of error tolerated when performing any necessary reprojection. |\n| `proj` | Projection, default: null | If specified, the result will be in the units of the coordinate system of this projection. Otherwise it will be in meters. |"]]