ee.Feature.distance
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Gibt die kürzeste Entfernung zwischen den Geometrien zweier Elemente zurück.
Nutzung | Ausgabe |
---|
Feature.distance(right, maxError, proj, spherical) | Gleitkommazahl |
Argument | Typ | Details |
---|
das: left | Element | Das Element mit der Geometrie, die als linker Operand der Operation verwendet wird. |
right | Element | Das Element mit der Geometrie, die als rechter Operand des Vorgangs verwendet wird. |
maxError | Fehlermarge, Standardeinstellung: null | Der maximale Fehler, der bei einer erforderlichen Neuprojektion toleriert wird. |
proj | Projektion, Standardwert: null | Die Projektion, in der der Vorgang ausgeführt werden soll. Wenn keine Angabe erfolgt, wird der Vorgang in einem sphärischen Koordinatensystem ausgeführt und lineare Entfernungen werden in Metern auf der Kugel angegeben. |
spherical | Boolescher Wert, Standard: „false“ | Wenn „true“ festgelegt ist, erfolgt die Berechnung auf dem Einheitskreis. Wenn „false“ festgelegt ist, erfolgt die Berechnung elliptisch unter Berücksichtigung der Erdabflachung. Wird ignoriert, wenn proj angegeben ist. Der Standardwert ist "false". |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[[["\u003cp\u003eMeasures the shortest distance between two geographical features.\u003c/p\u003e\n"],["\u003cp\u003eAccepts two features as input, along with optional parameters for error margin and projection.\u003c/p\u003e\n"],["\u003cp\u003eReturns the calculated distance as a floating-point number, representing the separation between the features.\u003c/p\u003e\n"],["\u003cp\u003eIf a projection is not specified, calculations default to a spherical coordinate system with distances in meters.\u003c/p\u003e\n"],["\u003cp\u003eAllows for specifying an error margin to manage the accuracy of calculations, particularly during reprojection.\u003c/p\u003e\n"]]],[],null,["# ee.Feature.distance\n\nReturns the minimum distance between the geometries of two features.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------------------------|---------|\n| Feature.distance`(right, `*maxError* `, `*proj* `, `*spherical*`)` | Float |\n\n| Argument | Type | Details |\n|--------------|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `left` | Element | The feature containing the geometry used as the left operand of the operation. |\n| `right` | Element | The feature containing the geometry used as the right operand of the operation. |\n| `maxError` | ErrorMargin, default: null | The maximum amount of error tolerated when performing any necessary reprojection. |\n| `proj` | Projection, default: null | The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere. |\n| `spherical` | Boolean, default: false | If true, the calculation will be done on the unit sphere. If false, the calculation will be elliptical, taking earth flattening into account. Ignored if proj is specified. Default is false. |"]]