mirror of
https://github.com/noodlapp/noodl-docs.git
synced 2026-01-11 14:52:54 +01:00
Initial commit
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>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: Geospatial Turf API
|
||||
hide_title: true
|
||||
---
|
||||
|
||||
<##head##>
|
||||
|
||||
# Turf.js API
|
||||
|
||||
Returns the Turf.js API object, allowing to use other Turf.js functions that doesn't have nodes yet.
|
||||
|
||||
<##head##>
|
||||
|
||||
## Outputs
|
||||
|
||||
<div className="ndl-table-35-65">
|
||||
|
||||
| Data | Description |
|
||||
| -------------------------------------- | ------------------------------------------------------------------ |
|
||||
| <span className="ndl-data">Turf</span> | The Turf.js object, making it possible to call any Turf.js method. |
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Geospatial Area
|
||||
hide_title: true
|
||||
---
|
||||
|
||||
<##head##>
|
||||
|
||||
# Geospatial Area
|
||||
|
||||
Takes an array of coordinates and returns their area in different formats.
|
||||
|
||||
<##head##>
|
||||
|
||||
## Inputs
|
||||
|
||||
<div className="ndl-table-35-65">
|
||||
|
||||
| Data | Description |
|
||||
| --------------------------------------------- | --------------- |
|
||||
| <span className="ndl-data">Coordinates</span> | GeoJSON feature |
|
||||
|
||||
</div>
|
||||
|
||||
## Outputs
|
||||
|
||||
<div className="ndl-table-35-65">
|
||||
|
||||
| Data | Description |
|
||||
| ------------------------------------------------- | ----------- |
|
||||
| <span className="ndl-data">Square Meters</span> | |
|
||||
| <span className="ndl-data">Square Hectares</span> | |
|
||||
| <span className="ndl-data">Square Km</span> | |
|
||||
| <span className="ndl-data">Acres</span> | |
|
||||
|
||||
| Signal | Description |
|
||||
| ------------------------------------------- | ------------------------------------ |
|
||||
| <span className="ndl-signal">Changed</span> | Occurs when the outputs are updated. |
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
title: Geospatial Center Of Mass
|
||||
hide_title: true
|
||||
---
|
||||
|
||||
<##head##>
|
||||
|
||||
# Geospatial Center Of Mass
|
||||
|
||||
Takes an array of coordinates and returns its center of mass using this formula: Centroid of Polygon.
|
||||
|
||||
<##head##>
|
||||
|
||||
## Inputs
|
||||
|
||||
<div className="ndl-table-35-65">
|
||||
|
||||
| Data | Description |
|
||||
| --------------------------------------------- | --------------- |
|
||||
| <span className="ndl-data">Coordinates</span> | GeoJSON feature |
|
||||
|
||||
</div>
|
||||
|
||||
## Outputs
|
||||
|
||||
<div className="ndl-table-35-65">
|
||||
|
||||
| Data | Description |
|
||||
| ------------------------------------------------ | ----------- |
|
||||
| <span className="ndl-data">Center Of Mass</span> | |
|
||||
| <span className="ndl-data">Centroid</span> | |
|
||||
|
||||
| Signal | Description |
|
||||
| ------------------------------------------- | ------------------------------------ |
|
||||
| <span className="ndl-signal">Changed</span> | Occurs when the outputs are updated. |
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
title: Geospatial Center
|
||||
hide_title: true
|
||||
---
|
||||
|
||||
<##head##>
|
||||
|
||||
# Geospatial Center
|
||||
|
||||
Takes a GeoJSON feature and returns the absolute center point.
|
||||
|
||||
<##head##>
|
||||
|
||||
Here is an example of how to use it.
|
||||
|
||||
<div className="ndl-image-with-background">
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
This is what is inside the "Get GeoJSON Feature" funciton node:
|
||||
|
||||
```js
|
||||
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:
|
||||
|
||||
```js
|
||||
const feature = Inputs.Feature;
|
||||
const coordinate = feature.geometry.coordinates;
|
||||
Outputs.Text = `${coordinate[0]}, ${coordinate[1]}`;
|
||||
```
|
||||
|
||||
## Inputs
|
||||
|
||||
<div className="ndl-table-35-65">
|
||||
|
||||
| Data | Description |
|
||||
| --------------------------------------------- | -------------------- |
|
||||
| <span className="ndl-data">Coordinates</span> | The GeoJSON feature. |
|
||||
|
||||
</div>
|
||||
|
||||
## Outputs
|
||||
|
||||
<div className="ndl-table-35-65">
|
||||
|
||||
| Data | Description |
|
||||
| ---------------------------------------- | ------------------------------------------- |
|
||||
| <span className="ndl-data">Center</span> | A GeoJSON feature with the center position. |
|
||||
|
||||
| Signal | Description |
|
||||
| ------------------------------------------- | ----------------------------------------- |
|
||||
| <span className="ndl-signal">Changed</span> | Occurs when the Center output is updated. |
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user