# GeoFence / WorldMap / Turfjs

**URL:** <https://discourse.nodered.org/t/geofence-worldmap-turfjs/57028>\
**Category:** General\
**Created:** [21 January 2022 19:52 UTC](https://discourse.nodered.org/t/geofence-worldmap-turfjs/57028 "2022-01-21T19:52:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lafayette](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@Lafayette](https://discourse.nodered.org/u/Lafayette)\
**Post date:** [21 January 2022 19:52 UTC](https://discourse.nodered.org/t/geofence-worldmap-turfjs/57028/1 "2022-01-21T19:52:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 January 2022 20:44 UTC](https://discourse.nodered.org/t/geofence-worldmap-turfjs/57028/2 "2022-01-21T20:44:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [21 January 2022 21:20 UTC](https://discourse.nodered.org/t/geofence-worldmap-turfjs/57028/3 "2022-01-21T21:20:11Z")

</div>

The Geofence node does not output geojson it's current shape output looks like:

Circle

```auto
{
  name: "GeoFence",
  layer: "geofence",
  fillOpacity: 0.05,
  fillColor: "#404040",
  clickable: true
  lat: 0.0
  lon: 0.0
  radius: 100
}

```

everything else

```auto
{
  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/](https://geojson.org/)

p.s. I'm the author/maintainer of the geofence node

---

<div class="post-metadata">

**Author:** ![Lafayette](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@Lafayette](https://discourse.nodered.org/u/Lafayette)\
**Post date:** [21 January 2022 22:27 UTC](https://discourse.nodered.org/t/geofence-worldmap-turfjs/57028/4 "2022-01-21T22:27:50Z")

</div>

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 😀 😇

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 March 2022 22:28 UTC](https://discourse.nodered.org/t/geofence-worldmap-turfjs/57028/5 "2022-03-22T22:28:14Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
