-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracker: FlatGeobuf Geospatial Loader #716
Comments
SymbolixAU/flatgeobufr#1 (comment)
|
Some time ago I did a test implementation of a The demo is awesome and the source repo is impressively ambitious and supports multiple language binding but I also found it to be something of a work-in-progress. At least the javascript bindings appear to still be rough around the edges: The published npm module was not properly set up to be usable, and I tried to fork the code however it was complex (perhaps a bit "over architected"?) and also was fully written in typescript, which complicated building it inside loaders.gl. At the time I decided that focusing on converting geojson to arrow (which also supports streaming loads) would be more generally useful. That said, I believe that flatgeobuf is a more compact representation., and I do like the initiative. I can push my branch if you'd like to take a second look. |
Is this true? I guess it could depend on what one needs, but I was assuming the flatgeobuf achieved its compactness by "interleaving" data - Are all the coordinates available in an array that could be accessible from the GPU? |
Yes, I opened an issue about this (flatgeobuf/flatgeobuf#52). The He suggested importing the untranspiled source, e.g. require('flatgeobuf/lib/generic/featurecollection.js') I haven't researched it much, but I think it would be possible to access everything we'd need through those imports.
I think you might be right, so I wouldn't necessarily say this is a top priority.
Are you referring to interleaving features or coordinates? At the coordinate level, we've been working with interleaved data, right? I.e.
I don't believe features are interleaved. I believe that each feature is its own flatbuffer, and so you should be able to get an array like
without copy from the original bytes. (And it looks possible to get line/polygon ring offsets in a similar fashion, though a copy might be involved there.) The format does, however, store |
I am pretty sure I tried that and ran into other issues, but don't recall exactly (I think not everything I needed was in that dist). |
Regarding #718 That is very neat micro integration! I'm open for discussion. My initial take is that the primary justifications for including a flatgeobuf loader in loaders.gl are:
I seem to recall that as I worked through the code, it looked like supporting the AsyncIterator model would take a bit of work. Also given that is is essentially a new experimental format, there is not likely to be much flatgeobuf data available, so a meaningful release should probably also offer a writer for the format. |
Yes, I agree the incremental loading is essential. I know you mentioned differences in "push/pull" here. I first need to read more about AsyncIterators, before attempting to add support for it. It'll also be helpful to read either your previous PR or look at other loaders that support incremental loading. |
From a few minutes of reading, I think AsyncIterators are supported by default in flatgeobuf... let it = flatgeobuf.deserializeStream(response.body)
it.next().then(handleResult) |
Yes
We need a version of One approach is to create a Stream wrapper over an async iterator ( Although it does suffer from a slight "impedance mismatch", it should work and also such an adapter could be reused for quick and dirty integrations of other stream based parsers. We already have the opposite helper function, create async iterator from stream - this is now actually built-in to Node streams). |
Ah I thought you were referring to output, not input.
I think that's worth some exploration. If it's small and reusable it could potentially enable new loaders, both this and Shapefile. |
Linking to this tracker issue in future release trackers, but closing for inactivity. |
FlatGeobuf is
It's a relatively new geospatial serialization format, but is exciting for a few reasons.
Cons:
Since this is a relatively new data format, it isn't the most widely used, but for users who have control over the backend data format and want highest performance, it could be ideal.
The text was updated successfully, but these errors were encountered: