Replies: 5 comments 6 replies
-
I don't think it's a good idea to wrap Go around C++ or Java. It would be better to use the generated Go source directly, which lives at https://github.com/flatgeobuf/flatgeobuf/tree/master/src/go and reimplement the higher level APIs as needed. It's not that much C++ code to port and would avoid wrapper issues. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this is what you were thinking, but in the past I've wondered if storing "aggregate" statistics on index nodes would be useful. My specific use case was displaying on a map of a lot of individual incidents, which, when zoomed in would show individual points, but when zoomed out would summarize the data as a heatmap. The file was very large (lots of points). When zoomed in, it worked well to utilize FGB's bbox filtering to get just the points on the viewport, but when zoomed out, I had no good way to build the heatmap summarizing the points. Downloading the entire FGB was not feasible because it was very large. At the time I was thinking if I could store some kind of aggregate statistics on the index nodes, I could use that for rendering the heat map portion. There is already a configurable "node size" as a parameter in the header, but it's interpreted to mean the "branching factor", so just trying to use that to add "padding" for metadata in the index nodes wouldn't work. You could add a new header parameter like "index node payload size (default = 0)" for a fixed metadata chunk in each node, or add some kind of pointer to externally stored metadata, but it would complicate the format quite a bit, and I'm not sure how many use cases there actually are for this kind of bbox aggregations. |
Beta Was this translation helpful? Give feedback.
-
Ok, I guess there was a misunderstanding in my part. So the idea is that the index is literally just that, but it does include the offset that can be set per NodeItem and then can be used to refer to whatever data (in a separate file?). So the idea would be generate that file and collect the offsets and then use that to generate the index, right? |
Beta Was this translation helpful? Give feedback.
-
Assuming my last comment reflects (more or less, maybe) how things would be, I guess one can actually create an extended API that would encapsulate both the index and data and allow for easy retrieval of data based on the hits in the RTree. |
Beta Was this translation helpful? Give feedback.
-
FWIIW, I just submitted a pull request for the Go implementation. |
Beta Was this translation helpful? Give feedback.
-
Hello. I am working on writing Go wrapper code around the generated flatbuffer types. I am mainly looking at the C++ and Java implementations (they seem to be pretty close to each other) but it seems both only support a static NodeItem that can not have any payload data associated with it. Is there really the case? Is there any implementation that does support extra data to be stored and retrieved? I will definitely need that in the Go wrapper and it seems I would be willing to roll out my own custom version of that but in case there is already a specification for this, I can follow it.
Any help here would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions