Write JSON from Lua object. #556
-
Hi Richard, Is there a way, during the Lua process, to generate out-of-the-box data ? If so, is there a way to access the geometry of the object being written ? and then post-process it with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sorry, I missed this one initially. No, there isn't at present. We have a few Lua instances running simultaneously, so I guess building this would require a common in-memory store, Lua wrappers to write to it, and a bunch of GeoJSON serialisation code. Probably quite complex for a fairly niche case. You could perhaps have a go at writing something in your Lua code that opened a new file on |
Beta Was this translation helpful? Give feedback.
Sorry, I missed this one initially. No, there isn't at present.
We have a few Lua instances running simultaneously, so I guess building this would require a common in-memory store, Lua wrappers to write to it, and a bunch of GeoJSON serialisation code. Probably quite complex for a fairly niche case.
You could perhaps have a go at writing something in your Lua code that opened a new file on
init_function
, appended to it as required inway_function
/node_function
, and closed it inexit_function
. At present you'd be limited to writing the object ID and the object centroid - the Lua scripts don't have access to any other part of the geometry. Because there are several Lua instances, you'd prob…