Hi,
I'm trying o discover the capabilities of Node Red with a geographic dimension and i'd like to know if there is a simple way to transform the geofence payload area into a geojson file ? I know that it's possible to display directly the area on WorldMap but i'd like to use it with Turfjs. I have little knowledges of development so I try to find some easy solutions to do that without coding.
Thx
Hi.
To save those who are unfamiliar with the 2 formats, if you post 2 examples (1 of each) there are plenty of folk on the forum who could point you towards a flow or function to translate one format to the other.
The Geofence node does not output geojson it's current shape output looks like:
Circle
{
name: "GeoFence",
layer: "geofence",
fillOpacity: 0.05,
fillColor: "#404040",
clickable: true
lat: 0.0
lon: 0.0
radius: 100
}
everything else
{
name: "GeoFence",
layer: "geofence",
fillOpacity: 0.05,
fillColor: "#404040",
clickable: true
area: [[0.0,0.0], [0.0,0.5], [0.5,0.5], [0.5,0.0]]
}
GeoJSON spec can be found here: https://geojson.org/
p.s. I'm the author/maintainer of the geofence node
Hi all, thx for your answers.
Hardillb, yes i did note that the output was different from the geojson format and i was looking fo a simple way to convert this output to geojson and save it onto a file without coding. So if you have the time to insert this option in your amazing node, feel free it would be very helpful
