mirror of
https://github.com/noodlapp/noodl-docs.git
synced 2026-01-11 14:52:54 +01:00
Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com> Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com> Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com> Co-Authored-By: Michael Cartner <32543275+michaelcartner@users.noreply.github.com>
1.6 KiB
1.6 KiB
title, hide_title
| title | hide_title |
|---|---|
| Geospatial Center | true |
<##head##>
Geospatial Center
Takes a GeoJSON feature and returns the absolute center point.
<##head##>
Here is an example of how to use it.
This is what is inside the "Get GeoJSON Feature" funciton node:
Outputs.Feature = {
type: "Feature",
geometry: {
type: "LineString",
coordinates: [
[102.0, 0.0],
[103.0, 1.0],
[104.0, 0.0],
[105.0, 1.0],
],
},
};
This is what is inside the "Extract Coordinate" function node:
const feature = Inputs.Feature;
const coordinate = feature.geometry.coordinates;
Outputs.Text = `${coordinate[0]}, ${coordinate[1]}`;
Inputs
| Data | Description |
|---|---|
| Coordinates | The GeoJSON feature. |
Outputs
| Data | Description |
|---|---|
| Center | A GeoJSON feature with the center position. |
| Signal | Description |
|---|---|
| Changed | Occurs when the Center output is updated. |
