Skip to content

Write JSON from Lua object. #556

Answered by systemed
BenOnTrack asked this question in Q&A
Discussion options

You must be logged in to vote

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 in way_function/node_function, and closed it in exit_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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BenOnTrack
Comment options

Answer selected by BenOnTrack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants